Overfitting is when a model learns its training data too well, memorising the noise instead of the real pattern, so it fails on new data.

Opposite failures. Underfitting shows high error on the training data itself. Overfitting shows low training error with a large validation gap.
Polynomial regression has the same trap as linear — if there is no pattern, fitting a curve just makes your mistakes fancier.
Testing a model on the same data it learned from is like grading your own exam — you will always get 100%, but you have learned nothing.
Train the model on 80% of data, test on 20%, and compare R² scores — if both are similar, your model generalises well.
Overfitting is when a machine learning model learns its training data too well. Instead of finding the general rule, it memorises the exact examples, including their random errors and quirks.
The result is a model that looks excellent and is not. It scores close to perfect on the data it was trained on, then does badly the moment it sees anything new. It never learned the rule. It learned the answers.
Think of it like this. A student memorises every question and answer in a practice book, word for word. On that practice paper they score full marks. The real exam asks the same ideas in different words, and they have nothing to fall back on.
One warning. Every fix here pushes the model toward being simpler. Push too far and you get the opposite problem, underfitting, where the model is too simple to learn anything useful.