Can someone explain the mechanics of the variance-covariance matrix in OLS? I have read many of similar posts here already as well as other resources on the topic, but they all generally just show the steps that generate this equation:
$\hat{\sigma^2}({X}'X)^{-1}$
What I want to know is how the above matrix operations work under the hood. How do they generate something like the equation below for each slope coefficient in a regression? How is the variance-covariance matrix being generated by those matrix operations?
$\sigma^{2}=\frac{\sum ( X - \mu )^2}{N}$
I look at the above equation and it makes sense to me what is happening, but I am having trouble seeing the matrix operation in the same way and it is annoying me.
I am by no means strong in matrix alebra and I realize that there may be something fundamental I just don't know. 
I understand this is a big task, but any help is appreciated. 
 A: My best short, intuitive explanation:
Take that $X'X$.  That is like the covariance of the $X$'s (it is actually the sum of squares).  So, the variance (ish) of each $X$, and how each one changes when the other is at a certain value.  
Take that $\hat\sigma$.  That is the residual variance.  On average, how far does a point lie from its estimated expected value?  Since it is scaled by $n$, think of it like a standard error.  It is the uncertainty in the expectation of $Y$ given $X$.  
Now, scale that ``standard error'' by the "covariance" (actually sum of squares) of the data.  What you have is the variance in the expectation of $Y$ per unit variance (covariance) in the data.  This is an interpretation of the variance of $\hat\beta$.  
All that said, understanding the formalism (including an understanding of why the derivation is structured the way it is) will help with the intuition more than an intuitive explanation will help with the intuition.  
A: The variance is defined as: $Var(X) = E[(X-\mu)^2]$. For OLS we can write it as:
\begin{align}
E[(\hat{\beta} - \beta)(\hat{\beta} - \beta)'] &= E[((X’X)^{-1}X’u)((X’X)^{-1}X’u)’] \\
&= E[(X’X)^{-1}X’uu'X(X’X)^{-1}] \\
\text{Now assume fixed X, and we can write:} \\
&= (X’X)^{-1}X’E[uu’]X(X’X)^{-1} \\
\text{Remember that: } E[uu’] = \sigma^2I \\ 
&= (X’X)^{-1}X’(\sigma^2I)X(X’X)^{-1} \\
&= \sigma^2I(X’X)^{-1}X’X(X’X)^{-1} \\
&= \sigma^2(X'X)^{-1}
\end{align}
It is then easy to show that the estimator is unbiased, consistent and efficient. Also you could estimate $\hat{\sigma}^2 = \frac{uu'}{n-k-1}$, which you would do in practice. 
