Least Squares and Auto and Cross Correlation
Cross-correlation and auto-correlation are not directly linked to least squares.

Least squares can create a line of best fit for a set of points.

Cross correlation is a measure of the similarity of one signal to another (as a function of time lag to one signal). The discrete (digital) cross-correlation is an array where each element tells you how much the signals correlate with a certain amount of time lag. This operation is performed naively with a sliding window, or faster using Fourier, or other transforms. xcorr(a,b) = IFFT(FFT(a)* conj(FFT(b)))

Auto correlation is a measure of the similarity of a waveform to itself as a function of time.

There are normalised variants of cross-correlation and auto-correlation. These are created by measuring the standard deviation of each signal and dividing the output by the multiple of both. This enables you to classify the level of correlation much more easily. 0 implies no correlation and 1 implies identical signals.