I'll try and explain it step by step, please correct me if I'm wrong.
Lets take a random matrix,
\begin{bmatrix}1 & 2 & 3 \\ 0 & 4 & 5 \\ 1 & 0 & 6 \end{bmatrix}
Then you take the cofactor of each element.
To find the cofactor take the element, eg. A_{11} then you delete the row and column that the elment is in. Then you find the determinant of the resultant matrix.
So for our matrix,
A_{11}, so delete row 1 and column 1.
This leaves us with,
\begin{bmatrix} 4 & 5 \\ 0 & 6 \end{bmatrix}
Then take the determinant of that matrix.
\begin{vmatrix} 4 & 5 \\ 0 & 6 \end{vmatrix} = ad-bc = 4 * 6 - 5 * 0 = 24.
So the first element, A_{11}, of the cofactor matrix is 24.
\begin{bmatrix}24 & ? & ? \\ ? & ? & ? \\ ? & ? & ? \end{bmatrix}
Just repeat the steps for the rest of the elements.