The objective of the least squares principle is to determine the parameters of the model such that the sum of the squared residuals is minimum. By residual we mean, the difference between the observed and the predicted value of the response variable. So, smallest squared residuals means the best possible prediction of the response variable. The regression model describes the existing functional relationship between the variables in the given set of observations.
Fitting a regression line to a given set of values means determining the parameter estimates of the model. These estimates are obtained to achieve some criterion. The criterion used in least squares principle is to obtain the parameter estimates such that the sum of the squared residuals is minimum. The regression line so obtained is the best fit
in the sense of minimum sum of squared residuals.
Apart from describing the relationship between the variables, another use of the regression model is to predict the values of the response variable
for some given values of the predictor variable.