What is a validation set for?
Google's glossary calls the validation set the subset of the dataset that performs initial evaluation against a trained model [3]. Data is typically split three ways: the model trains on the training set, is checked against the validation set, and gets a final check on the test set [1]. The loop runs like this: train, evaluate on the validation set, adjust the model, keep whichever version scores best on validation, then confirm it on the test set [1].
Why isn't a test set enough?
If you keep tweaking a model based on test results, it starts to fit the quirks of the test set [1]. scikit-learn puts it this way: when settings are tuned until the estimator performs best on the test set, knowledge of that set leaks into the model and the metrics stop reporting how well it generalises [2]. A validation set takes over the tuning, so the test set stays untouched. Even so, Google warns that validation and test sets wear out with repeated use and should be refreshed with new data [1].
For a concrete ratio, Google calls an 80/20 train/test split not optimal and a 70/15/15 split of training, validation and test data a much better one [1].
When does cross-validation replace it?
Splitting data three ways sharply cuts the number of examples left for training, and results can hinge on one random choice of split [2]. With k-fold cross-validation a separate validation set is no longer needed, though a test set should still be held out for the final evaluation [2].