For any Machine Learning model, the available data is usually split into three sets:
Training Set:
The part of data used to train the model and learn the parameters of the network.
The data that remains after allocation of the Training Dataset, is split into the Validation and Test sets.
Validation Set:
This sample of data is used to provide an unbiased evaluation of a model fit on the training dataset. This helps in tuning model hyperparameters to improve the model performance. Eg: Changing the number of clusters ($k$) in a K-Means algorithm, or the pooling layers in a CNN.
Test Set:
This part of the data is used to used to test how well the model generalizes to unseen datasets