Short Definition
A loss function measures how wrong a model is on an example or batch so training can improve it.
Intuition
The loss turns model mistakes into a number. Training tries to make that number smaller.
Technical Definition
A loss function maps predictions and targets to a scalar objective optimized by an algorithm such as gradient descent.
Example
Cross-entropy loss penalizes a classifier when it assigns low probability to the correct class.
Common Misunderstandings
Lower training loss does not always mean better real-world performance.
The loss function shapes what the model optimizes, not necessarily what users value.