Backpropagation is an algorithm used in training neural networks. It calculates the gradient of the loss function to adjust the weights for better predictions.