This answer is meant to elaborate on my remark above concerning crossed modules as models for 2-groupoids. A crossed module consists of a group $G$ acting on a group $H$, together with a $G$-equivariant group homomorphism $f:H \to G$ (where we consider $G$ as acting on itself by conjugation). From this data we can construct a 2-groupoid $X$ as follows: $X$ has a single object $x_0 \in X$, the $1$-morphisms from $x_0$ to itself are the elements of $G$ (with composition given by the group structure of $G$), and for $g_0,g_1 \in G$, the $2$-morphisms from $g_0$ to $g_1$ are the elements $h \in H$ such that $f(h)g_0 = g_1$. Vertical composition of 2-morphisms is then given by the group structure of $H$, while the vertical composition uses both this and the action of $G$ on $H$. More precisely, if $h \in H$ is such that $f(h)g_0 = g_1$ and $h' \in H$ is such that $f(h')g_0'= g_1'$ then their horizontal composition is the element $h(h')^{g_0} \in H$ (where $(h')^{g_0}$ denotes the action of $g_0$ on $h'$), considered as a 2-morphism from $g_0g'_0$ to $g_1g_1'$.

It can then be shown that all non-empty connected 2-groupoids arise in this way, i.e., are equivalent (in the sense of 2-groupoids) to a 2-groupoid that comes from a crossed module. This is not completely obvious: in principle, given a connected 2-groupoid $X$ and an object $x_0 \in X$ we may be inclined to construct the corresponding crossed module by setting $G = {\rm Hom}_X(x_0,x_0)$ and letting $H$ be the set of pairs $(\alpha,h)$ where $\alpha: x_0 \to x_0$ is a 1-morphism from $x_0$ to itself and $h$ is a 2-morphism from the identify on $x_0$ to $\alpha$. This construction is in principle "correct", only that it may give $G$ and $H$ which are not groups but only monoids: indeed, $X$ being a 2-groupoid doesn't mean that every 1-morphism is invertible on the nose, only that it is invertible up to an invertible 2-morphism. Nonetheless, one can still show that there is a way to choose $G$ and $H$ such that the resulting 2-groupoid will be equivalent to $X$. There is of course also the issue that in order to reconstruct the cross module we had to choose a base point in $X$. This reflects the fact that cross modules don't model 2-groupoids, but rather **pointed** 2-groupoids, i.e., 2-groupoids equipped with a base point (also known as **2-groups**).

2more comments