The two failure modes
Underfitting: the model cannot capture the structure even on training data. Training loss is high; validation loss is similar. Fix by adding capacity, more features, or better representations. Overfitting: the model memorizes training data. Training loss is tiny; validation loss is much worse. Fix by reducing capacity, regularizing, or getting more data.
Ridge, Lasso, Elastic Net
Ridge (L2) shrinks coefficients toward zero without forcing any to be exactly zero. Lasso (L1) shrinks and performs feature selection by zeroing out small coefficients. Elastic Net is a weighted combination, often the safest default for high-dimensional tabular data. The tuning knob is α (alpha): bigger means more shrinkage.
How to tune
Use RidgeCV, LassoCV, or ElasticNetCV with cross-validation to pick alpha automatically. Plot the validation curve so you can see whether you are at the bottom or near a cliff. Always run regularization inside a pipeline that scales features first.