Validation datasets are used to see how your model is doing while training. Usually after a certain number of epochs (data cycles), the model is run on the validation dataset and returns an accuracy/loss score. Since it's never seen this data before, seeing accuracy going up and loss going down is a good indicator that your model is learning correct patterns and will generalize well to new data it's never seen. You can adjust hyperparameters based on the output of the model on this data. A hyperparameter is a parameter whose value is used to control the learning process.