Linear regression is used in statistics two model the relationship between at least two variables (Simple Linear Regression). If there is more than one explanatory variable, multiple linear regression is used. How exactly that works is explained here.