Bending Spoons Interview Question

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