There are various types of regression:
- Linear regression logistic
- Logistic regression
- Polynomial regression

Linear regression is probably the most well known. By definition, when there is a linear relationship between a dependent variable—which is continuous—and an independent variable—which is continuous or discrete—you would use linear regression.
When the Y value in the graph is categorical—such as yes or no, true or false, the subject did or did not do something—then you would use logistic regression. Logistic regression is when the Y value on the graph is categorical and depends on the X variable. Notice that the trendline for linear regression and the line for logistic regression are different—more on that later.
Polynomial regression is when the relationship between the dependent variable Y and the independent variable X is in the nth degree of X. In a plot, you can see that the relationship is not linear; there’s a curve to that best-fit trendline.