Doubt in Linear Regression

Which of the following offsets, do we use in linear regression’s least square line fit? Suppose horizontal axis is independent variable and vertical axis is dependent variable?

  1. Vertical offset 2. Perpendicular offset 3. Both, depending on the situation 4. None of above Please explain this question and what should be the answer.