This means something is not always the same. It can be bigger or smaller or different in other ways. People or things can vary in many ways.
The prices vary in each store.
His moods vary from day to day.
When things vary, they are not all the same in a group. This shows there are many types or opinions.
Colors vary in the rainbow.
Opinions vary in the class.
Here, vary means to change when things like time or place change. It shows something is not fixed but moves with conditions.
Costs vary according to the location.
Temperatures vary with the seasons.
In math or science, vary means numbers or results are different from each other or from the average. It shows there is no single fixed value.
Data points vary around the average.
Results vary in the experiment.
To vary something means to change it a bit on purpose or naturally. This makes it different or more interesting.
You can vary the recipe as you like.
The teacher varies the lessons each day.
Vary can mean showing many different kinds or qualities in one thing or group. It means there is variety.
The styles vary from modern to classic.
The colors vary in brightness and tone.