Let $C$ be a small category: we define its *nerve* $(N(C)_k)_k$ as the following simplicial set: $N(C)_0=Ob(C)$ (the set of objects), $N(C)_1=Mor(C)$ (the set of all morphisms) and $N(C)_k$ to be a set of all $k$-tuples of compasable morhpisms $(f_1,...,f_k)$. This is equipped with the face maps $d_i$ defined by $d_i(f_1,...,f_k):=(f_1,...,f_{i-1},f_i \circ f_{i+1},f_{i+2},...,f_k)$ except of $d_0$ and $d_k$ which omit the first and the last morphism. Degeneracies act as follows $s_j(f_1,...,f_k):=(f_1,...,f_{j-1},id,f_j,...,f_k)$.

When $G$ is a group then $G$ can be viewed as a small category with only one object and the set of morphisms being $G$ itself. Thus everything is composable and $N(G)_k=G^k$.

One thus arrives at the well defined simplicial set. Therefore one can speak about its geometric realization $|N(G)|$: there are in fact two possible versions, the standard one, sometimes called ,,thin realization'' and another version, which is called ,,thick'' realization which is denoted by $\| N(G) \|$ and which is defined using only relations involving the face maps. See also this discussion.

I was told that this geometric realization is in fact (possible version of) the classifying space $BG$. I wonder why it is true. This question is motivated by this discussion. Since my original motivation was the statement that the group cohomology coincides with the (singular for example) cohomology of the classifying space and with the help of the cited discussion I was able to understand why is it true directly (not invoking the fact that $BG$ is geometric realization of $N(G)$) I'm posting this question as another topic. So my question is:

Why the geometric realization of $N(G)$ is (homotopy equivalent to) $BG$?

Some ideas can be found in Hatcher's book ,,Algebraic Topology'' however, as I understood correctly, the face maps $d_i$ from this book would act rather as $(g_1,...,g_k) \mapsto (g_1,...,g_{i-1},g_{i+1},...,g_k)$ which is not the same as for $N(G)$.

EDIT: The classifying space is not unique up to homeomorphism, but it is unique up to homotopy: the definition which is most familiar for me is the abstrack definition as the quotient of contractible principial $G$-bundle $EG$. There is also specyfic *construction* due to Milnor using infinite join which is also familiar to me.

EDIT 2: As I understood correctly the answer below: each element from $\mathcal{E}G_n$ being of the form $(g_0,g_1,...,g_n)$ may be presented in the form $(g_0',g_0'g_1',...,g_0'g_1'...g_n')$. Solving in $g_0',...,g_n'$ gives $g_0'=g_0,g_1'=g_0^{-1}g_1,...,g_n'=g_{n-1}^{-1}g_n$. Thus we obtain a bijective map $\alpha:\mathcal{E}G_n \to \mathcal{E}G_n$ given by $\alpha(g_0,...,g_n)=(g_0,g_0^{-1}g_1,...,g_{n-1}^{-1}g_n)$. Let $d_i,s_j$ be the face maps and degeneracies which you described (omitting $i$-th vertex and repeating) and $d_i',s_j'$ be faces and degeneracies as in the definition of the nerve of the category. Then $\alpha s_j=s_j' \alpha$ and $\alpha d_i=d_i' \alpha$ for all $j$ and for all $i$ *except* $i=0$ where we obtain the difference on the zeroth coordinate $(\alpha d_0)(g_0,...,g_n)=(g_1,...)$ and $(d'_0 \alpha)(g_0,...,g_n)=(g_0^{-1}g_1,...)$ (the remaining entries are the same). Therefore if we pass to the quotient we get an equality. This suggest that there is something correct in this procedure: however I'm little bit confused with the following: $\mathcal{E}G$ is a simplicial set. Its geometric realization is just topological space: the bar notation which you are using refers to $EG/G$ which is also topological space. However you described face and degeneracies maps for $EG/G$ which looks like the relevant maps for $NG$ but the former is just topological space while the latter is (abstract) simplicial set.