For one, but that might be irrelevant to you, this formula is not the way you want to actually compute determinants; there are much more efficient methods for that. But I will try to help you understand the formula.
We have an $n \times n$-matrix $A$. Its elements are $a_{i,j}$ as usual, or $a[i,j]$ in more C-like notation.
The outer sum sums over all permutations (this set is $S_n$), so that is an outer loop. A permutation is just a reordering of the indices, like $(1,3,2)$ for $n=3$; for $n=3$ there are $3!$ permutations of the indices: $(1,2,3),(1,3,2),(2,1,3),(2,3,1),(3,1,2),(3,2,1)$, and for $n$ indices there are $n!$ in general. Here we can interpret this as a function: $(3,2,1)$ is the function that sends $1$ to $3$, $2$ to $2$ and $3$ to $1$, e.g. Now, each permutation has a sign $\operatorname{sgn}(\sigma)$, which is either +1 or -1. The identity has sign +1, while interchanging two elements of a permutation changes the sign to the opposite one. So $(1,3,2), (3,2,1), (2,1,3)$ are odd permutations on $n=3$, because we interchanged one pair. One can prove that half the permutations are even (have sign +1), and the other half has sign -1.
Now for each permutation $\sigma$ we take the multiplication of the elements of $A$ as specified by the permutation, interpreted as a map. So $(1,3,2)$ is the map $1 \rightarrow 1, 2 \rightarrow 3, 3 \rightarrow 2$, so we get the product $a_{1,1}a_{3,2}a_{2,3}$, where the second index is the original, the first its image under $\sigma$.
The formula says that $\det(A)$ is the sum of all such products where we consider all permutations of the index set, and the products from an odd permutation get a minus sign.
So for $n=3$ we get $$\det(A) = a_{1,1}a_{2,2}a_{3,3} - a_{1,1}a_{2,3}a_{3,2} - a_{1,3}a_{2,2}a_{3,1} - a_{1,2}a_{2,1}a_{3,3} + a_{1,2}a_{2,3}a_{3,1} + a_{1,3}a_{2,1}a_{3,2}$$ where the minus signs correspond to the odd permutations from above.
So you need algorithms to enumerate all permutations, and compute their signs, and then loop over all these products. It's quite complicated to get right, and not very efficient. But this formula allows one to prove some facts for determinants, so it has its uses.
This is my proof without defining new notations.
Continuing from the induction hypothesis
$$\det{A}
=\sum_{j=1}^{n+1}(-1)^{1+j}[A]_{1,j}\det{A_{1,j}}
=\sum_{j=1}^{n+1}(-1)^{1+j}[A]_{1,j}\sum_{\sigma\in S_n}\text{sgn }\sigma\prod_{i=1}^{n}[A_{1,j}]_{i,\sigma(i)}$$
Denote $[n]=\{1, 2, ..., n\}$.
For any $\sigma\in S_n$,
since $\sigma$ is bijective,
let
$$i_1=\sigma^{-1}(1), i_2=\sigma^{-1}(2), ..., i_n=\sigma^{-1}(n).$$
Then $\{i_1, i_2, ..., i_n\}=[n]$
and $$\sigma(i_1)=1, \sigma(i_2)=2, ..., \sigma(i_n)=n.$$
As the following figure indicates.
$$\begin{matrix}
[n] & \sigma\in S_n & [n]\\
\hline
i_1 & \longrightarrow & 1 \\
i_2 & \longrightarrow & 2 \\
\vdots & \vdots & \vdots \\
i_n & \longrightarrow & n \\
\end{matrix}$$
Then
\begin{eqnarray*}
\det{A}
&=& \sum_{j=1}^{n+1}(-1)^{1+j}[A]_{1,j}\sum_{\sigma\in S_n}\text{sgn }\sigma\prod_{i=1}^{n}[A_{1,j}]_{i,\sigma(i)}\\
&=& \sum_{j=1}^{n+1}(-1)^{1+j}[A]_{1,j}\sum_{\sigma\in S_n}\text{sgn }\sigma\prod_{k=1}^{n}[A_{1,j}]_{i_k, \sigma(i_k)}\\
&=& \sum_{j=1}^{n+1}(-1)^{1+j}[A]_{1,j}\sum_{\sigma\in S_n}\text{sgn }\sigma\prod_{k=1}^{n}[A_{1,j}]_{i_k, k}\\
&=& \sum_{j=1}^{n+1}(-1)^{1+j}[A]_{1,j}\sum_{\sigma\in S_n}\text{sgn }\sigma\left(\prod_{k=1}^{j-1}[A_{1,j}]_{i_k, k}\prod_{k=j}^{n}[A_{1,j}]_{i_k, k}\right)\\
&=& \sum_{j=1}^{n+1}(-1)^{1+j}[A]_{1,j}\sum_{\sigma\in S_n}\text{sgn }\sigma\left(\prod_{k=1}^{j-1}[A]_{i_k+1, k}\prod_{k=j}^{n}[A]_{i_k+1, k+1}\right)\\
&=& \sum_{j=1}^{n+1}(-1)^{1+j}\sum_{\sigma\in S_n}\text{sgn }\sigma\left([A]_{1,j}\cdot \prod_{k=1}^{j-1}[A]_{i_k+1, k}\prod_{k=j}^{n}[A]_{i_k+1, k+1}\right)\\
&=& \sum_{j=1}^{n+1}(-1)^{1+j}\sum_{\sigma\in S_n}\text{sgn }\sigma \cdot [A]_{1,j}\cdot \underline{[A]_{i_1+1, 1}\cdot [A]_{i_2+1, 2}\cdots [A]_{i_{j-1}+1, j-1}}\cdot \\
&& \underline{[A]_{i_j+1, j+1}\cdot [A]_{i_{j+1}+1, j+2}\cdots [A]_{i_n+1, n+1}}\\
&=& \sum_{j=1}^{n+1}(-1)^{1+j}\sum_{\sigma\in S_n}\text{sgn }\sigma \cdot \underline{[A]_{i_1+1, 1}\cdot [A]_{i_2+1, 2}\cdots [A]_{i_{j-1}+1, j-1}}\cdot \\
&& [A]_{1,j}\cdot \underline{[A]_{i_j+1, j+1}\cdot [A]_{i_{j+1}+1, j+2}\cdots [A]_{i_n+1, n+1}}\\
\end{eqnarray*}
Consider a permutation $\tau_{\sigma}\in S_{n+1}$ as following
$$\begin{matrix}
[n+1] & \tau_{\sigma}\in S_{n+1} & [n+1]\\
\hline
i_1+1 & \longrightarrow & 1 \\
i_2+1 & \longrightarrow & 2 \\
\vdots & \vdots & \vdots \\
i_{j-1}+1 & \longrightarrow & j-1 \\
1 & \longrightarrow & j \\
i_j+1 & \longrightarrow & j+1 \\
\vdots & \vdots & \vdots \\
i_n+1 & \longrightarrow & n+1 \\
\end{matrix}$$
Then the equation above equals to
$$\det{A}=\sum_{j=1}^{n+1}(-1)^{1+j}\sum_{\sigma\in S_n}\text{sgn }\sigma\prod_{\ell=1}^{n+1}[A]_{\ell, \tau_{\sigma}(\ell)}.$$
Note that there is an one-to-one correspondence between $\sigma\in S_n$ and $\tau_{\sigma}\in S_{n+1}$ with $\tau_{\sigma}(1)=j$.
By the Lemma 2,
$\text{sgn }\tau_{\sigma}=(-1)^{1+j}\text{sgn }\sigma$.
Then
$$\det{A}=\sum_{j=1}^{n+1}\sum_{\substack{\tau\in S_{n+1}\\ \tau(1)=j}}\text{sgn }\tau\prod_{\ell=1}^{n+1}[A]_{\ell, \tau(\ell)}
=\sum_{\tau\in S_{n+1}}\text{sgn }\tau\prod_{\ell=1}^{n+1}[A]_{\ell, \tau(\ell)}.$$
Lemma 1.
If $\gamma\in S_{n+1}$ is
$$\begin{matrix}
[n+1] & \gamma\in S_{n+1} & [n+1]\\
\hline
1 & \longrightarrow & x_1 \\
2 & \longrightarrow & x_2 \\
\vdots & \vdots & \vdots \\
i & \longrightarrow & x_{i}\\
i+1 & \longrightarrow & x_{i+1}\\
\vdots & \vdots & \vdots \\
n+1 & \longrightarrow & x_{n+1}\\
\end{matrix}$$
Then $(x_i, x_{i+1})\gamma$ is
$$\begin{matrix}
[n+1] & \gamma\in S_{n+1} & [n+1]\\
\hline
1 & \longrightarrow & x_1 \\
2 & \longrightarrow & x_2 \\
\vdots & \vdots & \vdots \\
i & \longrightarrow & x_{i+1}\\
i+1 & \longrightarrow & x_{i}\\
\vdots & \vdots & \vdots \\
n & \longrightarrow & x_n \\
\end{matrix}$$
Lemma 2.
Back to our $\sigma$.
Consider $\sigma^{-1}\in S_n$.
We can define $\sigma^{-1}(n+1)=n+1$ to make it as an element in $S_{n+1}$.
That is,
$$\begin{matrix}
[n+1] & \sigma^{-1}\in S_{n+1} & [n+1]\\
\hline
1 & \longrightarrow & i_1 \\
2 & \longrightarrow & i_2 \\
\vdots & \vdots & \vdots \\
n & \longrightarrow & i_n \\
n+1 & \longrightarrow & n+1
\end{matrix}$$
By the Lemma 1, we can left-multiply a product of $m$ transpositions to make $i_1, i_2, ..., i_n, n+1$ in the right column in an increasing order.
In fact,
the product of these transpositions is $\sigma$.
Again, applying the Lemma 1 on $\tau_{\sigma}^{-1}\in S_{n+1}$ in the same way.
We can left-multiply $j-1$ transpositions to $\tau_{\sigma}^{-1}$ to move $1$ to the first element in the right column.
Then left-multiply $m$ transpositions to make $i_1+1, i_2+1, ..., i_n+1$ in the right column into an increasing order.
$$\begin{matrix}
[n+1] & \tau_{\sigma}^{-1}\in S_{n+1} & [n+1]\\
\hline
1 & \longrightarrow & i_1+1 \\
2 & \longrightarrow & i_2+1 \\
\vdots & \vdots & \vdots \\
j-1 & \longrightarrow & i_{j-1}+1 \\
j & \longrightarrow & 1 \\
j+1 & \longrightarrow & i_j+1 \\
\vdots & \vdots & \vdots \\
n+1 & \longrightarrow & i_n+1 \\
\end{matrix}$$
Suppose that
$s_m \cdots s_2 s_1 t_{j-1} \cdots t_2 t_1\tau_{\sigma}^{-1}=r_m\cdots r_2 r_1\sigma^{-1}=\varepsilon$,
where $s_m, ..., s_2, s_1, t_{j-1}, ..., t_2, t_1, r_m, ..., r_2, r_1$ all are transpositions
and $\varepsilon$ is the identity in $S_{n+1}$.
Therefore,
\begin{eqnarray*}
&&\text{sgn }(s_m \cdots s_2 s_1 t_{j-1} \cdots t_2 t_1\tau_{\sigma}^{-1})=\text{sgn }(r_m\cdots r_2 r_1\sigma^{-1})\\
&\Rightarrow& \text{sgn }(s_m \cdots s_2 s_1)\cdot \text{sgn }(t_{j-1} \cdots t_2 t_1)\cdot \text{sgn }(\tau_{\sigma}^{-1})=\text{sgn }(r_m\cdots r_2 r_1)\cdot \text{sgn }(\sigma^{-1})\\
&\Rightarrow& (-1)^{m}(-1)^{j-1}\text{sgn }(\tau_{\sigma}^{-1})=(-1)^{m}\text{sgn }(\sigma^{-1})\\
&\Rightarrow& (-1)^{j-1}\text{sgn }(\tau_{\sigma}^{-1})=\text{sgn }(\sigma^{-1})\\
&\Rightarrow& (-1)^{j-1}\text{sgn }(\tau_{\sigma})=\text{sgn }(\sigma)\\
&\Rightarrow& (-1)^{1+j}\text{sgn }(\tau_{\sigma})=\text{sgn }(\sigma)
\end{eqnarray*}
Best Answer
(1) $\sigma$ ranges over elements of $S_n$, i.e. permutations of $\{1,\cdots,n\}$, and $\mathrm{sgn}(\sigma)$ refers to the sign of the permutation ($+1$ if it is an even permutation, $-1$ if it is an odd permutation). Geometrically, permutations of coordinates are preserve or reverse the orientation of space exactly when the sign of the permutation is positive of negative.
Let's work this out by hand with $n=3$. In one-line notation for permutations, here are all of the $3!=6$ permutations of $\{1,2,3\}$ and their signs:
$$ \begin{array}{ccc} \color{Red}{(123),+} & \color{Lime}{(132),-} & \color{Blue}{(213),-} \\ (231),+ & (312),+ & (321),- \end{array} $$
Therefore, we have (using the above permutations in this order)
$$ \large \det\begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix} = \begin{array}{l} \color{Red}{+}a_{\color{Red}{1}1}a_{\color{Red}{2}2}a_{\color{Red}{3}3} \color{Lime}{-}a_{\color{Lime}{1}1}a_{\color{Lime}{3}2}a_{\color{Lime}{2}3}\color{Blue}{-}a_{\color{Blue}{2}1}a_{\color{Blue}{1}2}a_{\color{Blue}{3}3} \\ +a_{21}a_{32}a_{13}+a_{31}a_{12}a_{23}-a_{31}a_{22}a_{13}. \end{array} $$
(Sorry for lime green's harshness, normal green is too close to black.)
(2) The entries of the identity matrix $I$ are the Kronecker delta function $\delta_{ij}$ (which is $1$ when $i=j$ and $0$ otherwise). The sum over all permutations can be split into two: the term when $\sigma=\mathrm{id}$ is the identity map, and all of the other terms when $\sigma\ne \mathrm{id}$. In the first case, $\mathrm{id}(i)=i$ for all $i$ and $\mathrm{sgn}(\mathrm{id})=+1$ so the summand is $+\prod_{i=1}^n (1+Q_{ii})$.