Linear regression is the simplest model for regression, and usually the first one worth trying. It predicts a number by multiplying each input feature by a weight, adding the results, and adding a constant. A house price model might learn that each extra square metre adds a fixed amount and each extra kilometre from the city centre subtracts one.
Training means choosing the weights. The standard choice, ordinary least squares, picks the weights that minimize the mean squared error between predictions and the true values on the training data. For this particular loss there is a closed-form answer, the normal equations, so the model can be solved directly. On very large datasets it is often fitted with gradient descent instead.
Why it still matters
A linear model is fast, hard to overfit when features are few, and readable: each weight says how much the prediction moves when that feature changes, holding the others fixed. That makes it a strong baseline and a common tool wherever a result has to be explained.
“Linear” refers to the weights, not the inputs. Adding squared or combined features lets the same method fit curves, and the model stays linear in its parameters. A single neuron with no activation function computes exactly this weighted sum.
Where it goes wrong
Squared error punishes large mistakes heavily, so a few outliers can drag the whole fit. When features are strongly correlated, individual weights become unstable and stop being trustworthy to read. Adding a penalty on the weights, as in ridge regression (L2) or the lasso (L1), is the usual fix. R-squared is the common summary of how much of the variation the fit explains.