The covariance of two random variable
is the expectation
of their product
the product of their expectations:
CovXY = EXY - EX EY
Covariance is of course analogous to the variance of a single random variable. The covariance function of a random process is its autocovariance; if this random process forms a vector, then the autocovariance of this vector forms its covariance matrix.