We start from the definition of covariance:
$\text{Cov}(X, Y) = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x - \mu_X)(y - \mu_X) f(x,y) \, dx \, dy $
Plugging in Y = X (abuse of notation):
$\text{Cov}(X, X) = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x - \mu_X)(x - \mu_X) f(x,x) \, dx \, dx $
Now, I'm not able to intuitively understand how f(x, x) turns into f(x). Can someone shed some light? Basically, I'm confused as to how the definition of covariance for two different variables generalizes when we're dealing with the same random variable.