Technically, this is for the discrete case. Squaring this magnifies larger deviations. The positive square root is called the standard deviation. When dealing with two random variables, one might want to know how closely are the two random variables related. Another way to think about it is that covariance is a measure of the joint association between the two random variables.
Covariance is used to determine if two random variables are positively or negatively related.
A problem with covariance is that it is sensitive to the units in which X and Y are measures. For example, if we were looking at the relationship between player salary and team revenue and we started in millions of dollars. If we changed units to dollars, the covariance would change by a factor of 1,000,000. R 2 will be used more in this course since we will most often examine the relationship between more than just two random variables.