Training set (~80%)
used to fit model parameters
Validation set (~10%)
used to tune hyperparameters and detect overfitting
Test set (~10%)
touched once, at the very end, for final reporting
The entire point of ML is generalization — performing well on data the model has never seen. A model that just memorizes its training set is useless; that's why we never evaluate a model on the data it was trained on.