Ridge (L2) shrinks coefficients smoothly toward zero and handles multicollinearity well. Lasso (L1) shrinks and sets some coefficients exactly to zero, giving feature selection. Elastic net combines both.
Why L1 zeroes coefficients and L2 does not is a standard follow-up: the L1 penalty has a corner at zero, so the constrained optimum often lands exactly on an axis.
Practical note. Standardise features first, or the penalty applies unevenly across variables measured on different scales - a common silent error.