ANOVA: compares means among 3 models or linear vs simpler model? So I'm super confused. Looking online for example:here or here or here or in any other website I could find ANOVA is " used to determine whether there are any statistically significant differences between the means of three or more independent (unrelated) groups" or "are useful for comparing (testing) three or more means (groups or variables) for statistical significance" or "ANOVA is used to compare differences of means among more than 2 groups.".
However I'm studying linear regression models and both in simple and in multiple linear regression, our lecturer uses ANOVA in a totally different way!
We use ANOVA to compare the linear regression model (where response depends linearly on explanatory variable) with the simpler "constant" model where there is no relationship between response and explanatory variable. (and similarly for multiple linear regression we compare whether we need $p>q$ explanatory variables or only $q$ are enough)

Hence is my lecturer teaching us something wrong? Are they two different types of ANOVA but with the same name? Or are they the same thing and I don't see the connection?

EDIT
Here is what the lecture notes say for simple linear regression (similar for multiple):


 A: I think what you're talking about is just the definition for ANOVA. Remember:


*

*ANOVA is used to "determine whether there are any statistically significant differences between the means of three or more independent (unrelated) groups". That's in your question, good.

*To do that, ANOVA partitions the variation between groups as "regression sum of squares".

*To do that, ANOVA also partitions the variation within groups as "residual sum of squares".

*That's why you see "Regression" and "Residual" source in your lecture notes.

*We then use the F-test to compare "Regression" and "Residual" as a ratio. If the ratio is too large, we conclude there is significant difference in group effects.


Your lecturer was correct. In fact, it was just the definition for ANOVA. There is no contradiction, we're talking about the same thing.
My answer is not very mathematical, because I know you're asking for easy explanation (e.g. I skip degrees of freedom). If you're looking for more precise explanation, head to:

https://onlinecourses.science.psu.edu/stat414/node/218

