Covariance is a statistical measure of how two different data series change with respect to each other. Suppose we have two measures: x and 2x. Those have very high covariance, as when one measure (x) goes up, the other measure (2x) goes up. A measure such as x and 2x will have very negative covariance, since as one measure goes up, the other goes down. We say two measures co-vary when their covariances are high. For example, the price of oil and the price of gasoline tend to have high covariance, whereas the price of oil and the top score in the annual NBA dunk contest have low covariance.
Formally, the equation for the covariance of two variables X and Y is: E(X)E(Y) - E(XY) where E() means expected value. In English, that means covariance is equal to the expected value of X times the expected value of Y, minus the expected value of X times Y.
Covariance is highly relevant to investors attempting to construct a balanced portfolio. Ideally, investors want to construct a portfolio with uncorrelated returns, which generally means assembling portfolios with securities that do not co-vary with other securities in the bundle. If two securities co-vary, if one falls the others do too which may create unacceptably large risks.