The line of best fit uses least-squares. If your points are in a linear fashion, you can come up with a line, y=mx+b, where the magnitude is minimized. The line you achieve will be the line of best fit. Of course, we could do this for circles, quadratics, polynomials, etc.