Logger Pro calculates the "best fit" line on graphs by using linear regression by the method of least squares. The equations used linked below. The reason for the PDF document is so that superscipts and subscripts are not lost.
This document also explains how the correlation coefficient of the regression line and the uncertainties of the slope and intercept are determined.
These are fairly standard formulas. The correlation coefficient of the regression line is a useful measure of how well the data fits a straight line, but it should not be overused. Always examine the graph. The coefficient is greatly affected by a few extreme points.
Refer to a statistics text for more information; for example, An Introduction to Error Analysis by John R. Taylor, Oxford University Press, 1982.