To put another context to the above comments and answers, recall that a *crossed module* consists of a morphism $\mu: M \to P$ together with an action of $P$ on the right of the group $M$ satisfying the two axioms

$\mu(m^p)= p^{-1}\mu(m) p$;

$ m^{-1} nm = m^{\mu n}$,

for all $m,n \in M, p \in P$. This definition is due to J.H.C. Whitehead in 1946.

Examples of crossed modules are:

the inner automorphism crossed module $\chi: M \to Aut(M)$ for any group $M$;

the inclusion $M \to P$ of a normal subgroup $M$ of $P$;

the zero map $0: M \to P$ for any right $P$-module $M$;

the induced map $\pi_1(F) \to \pi_1(E)$ for any pointed fibration $F \to E \to B$;

and others!

Any such crossed module has a *classifying space* $B(M \to P)$ whose homotopy groups are trivial above dimension $2$, and with $\pi_1 \cong Coker \mu$, $\pi_2 \cong Ker \mu$. More details of these facts are in the book EMS Tract 15. Crossed modules are equivalent to group objects in the category of groupoids, and this gives one way of defining the classifying space, using bisimplicial sets, and are conveniently regarded as *$2$-dimensional versions of groups*, since they model pointed weak homotopy $2$-types. Note that the second homotopy group, even considered as a module over $\pi_1$, is generally but a pale shadow of the homotopy $2$-type.

There is also a Seifert-van Kampen type theorem with values in crossed modules, and this allows some computations of nonabelian second relative homotopy groups. See again the EMS Tract 15.