Underfitting occurs when a machine learning model cannot capture the relationship between the input data and the output target value.