Overfitting happens when a model is too closely fit to the training data, and as a result, does not generalize well to new data. This can happen if the model is too complex, or if the training data is not representative of the true underlying distribution. Overfitting can lead to poor performance on out-of-sample data.