Regularization keeps a flexible model's weights small by adding a penalty for their size to the loss. The penalty's strength trades fitting the training data against staying smooth, and is chosen by the error on held-out data.
Gradient Rush needs JavaScript to play.