Pergunta de entrevista da empresa Bending Spoons

Explain the difference between overfitting and underfitting. How can you prevent them?