Pregunta de entrevista de Morgan Stanley

How does cross validation work and what is it used for?