Do we actually take random line in first step of linear regression? 
This is the screenshot I took from a video on linear regression made by Luis Serrano. He explained linear regression step by step (scratch version). The first step was to start with a random line.
The question is do we actually draw a random line, or instead do we perform some calculation like taking an average of y values and initially draw a line. Because if we take any random line it might not fall near any points at all. Maybe it will fall on the 3rd quadrant of the coordinate system where there are no points in this case.

Sometimes it is more intuitive to show things graphically, mostly for beginners. You can do it this way, of course, but in practice this is not how it is done, as there is a closed form solution, as Frank Harrel mentioned in the comment. If you have a single independent variable, as in simple linear regression, $\hat y_i = \hat\beta_0 + \hat\beta_1x$, you solve it analytically, through the equations below:
$\hat\beta_1=\frac{cov(x,y)}{var(x)}$
and
$\hat\beta_0=\bar y-\beta_1\bar x$
By the way, it is possible that this question (Why is a regression coefficient covariance/variance?) is of your interest.
