Linear regression is the fundamental machine learning algorithm used for predicting a continuous target variable based on several input features. It works by determining the best-fit line that minimizes the difference between predicted values and actual data points. This line can be represented by an equation, where the coefficients of each feature