I studied algebraic topology from a mathematical point of view, so I can only try to explain the physical interpretation.
Beginning with the mathematics. The fundamental group associated with a pointed topological space is a set of equivalence classes of closed loops (under homotopy). But what does this mean? Let's start with basics.
A topological space $X$ is a general mathematical structure that is equipped with the notion of continuity and convergence (and etc.).
A pointed topological space is just the old topological space $X$, now equipped with a chosen point $a\in X$. One write this as $\left(X,a\right)$.
Why do we need a pointed topological space? Because then we can look on loops starting and ending at $a$. Those are continuous functions $\gamma :[0,1]\rightarrow X$ with $\gamma(0)=\gamma(1)=a$.
Those loops are interesting, because you can connect them one after another
$$(\gamma_{1}\ast\gamma_{2})(t)=\left\{\begin{matrix}\gamma_{1}(2t) & 0\leq t\leq\frac{1}{2}\\ \gamma_{2}(2t-1) & \frac{1}{2}< t\leq 1\end{matrix}\right.$$
and you can find their inverse (caution! this is incorrect, see below)
$$\gamma^{-1}(t)=\gamma(1-t)$$
You also have an identity element
$${\rm id}(t)=a$$
Therefore, you have here (almost) a group structure. For this to be a group, you can't really look at all the loops as different - you must consider two loops $\gamma_{1}$ and $\gamma_{2}$ to be the same, if you can deform $\gamma_{1}$ into $\gamma_{2}$ continuously. This is known as an homotopy. A great illustration of this is available in this Wikipedia page. I attach it also here

Mathematicians call this kind of "considering two objects to be the same" by the name equivalence relation, and this results in equivalence classes. Let's now denote by $[\gamma_{1}]$ all the loops that are equivalent to $\gamma_{1}$ under the homotopy relation. The set of all those loops
$$\pi_{1}(X,a)=\left\{[\gamma]|\gamma : [0,1]\rightarrow X,\: \gamma(0)=\gamma(1)=a\right\}$$
is called the fundamental group. Now returning to the inverse of a loop, try to think why
$$\gamma^{-1}\ast\gamma\neq{\rm id}$$
but in fact
$$[\gamma^{-1}]\ast[\gamma]=[{\rm id}]$$
Some examples
Let $X=\mathbb{R}^3$, i.e. the 3D space, and choose $a=0$ to be the origin. You can imagine that you can shrink every loop in $\mathbb{R}^{3}$ to a point, so all the loops are equivalent. This means that $\pi_{1}(\mathbb{R}^3,0)=\{{\rm id}\}$ is trivial.
Let $X=S^{1}$, the unit circle, and choose $a=(1,0)$. Note that every loop is characterized by how many times it circles the origin. That's an integer known as the winding number. So for instance, you have a loop that circles the origin once counter-clockwise ($=1$) and you have a loop that circles the origin twice, but clockwise ($=-2$) and so on. Therefore $\pi_{1}(S^{1},(1,0))=\mathbb{Z}$.
More relevant examples
Note that ${\rm SO}(1)=\{1\}$, so of course $\pi_{1}({\rm SO}(1))=\{{\rm id}\}$ is trivial.
For ${\rm SO}(2)$, you can argue that it is the same as $S^{1}$, in the sense that rotations in 2D are equivalent to $e^{i\theta}$, which form the unit circle. Thus $\pi_{1}({\rm SO}(2))=\mathbb{Z}$.
For ${\rm SO}(3)$, every rotation can be achieved by giving the axis of rotation, with is a point on the sphere $S^{2}$, and the rotation angle, which is in $S^{1}$. Note, however, that $(\boldsymbol{n},\theta)\sim(-\boldsymbol{n},-\theta)$ are equivalent rotations. This turns out to be equivalent to something known as the real projective space ${\rm RP}^{3}$, which has $\pi_{1}({\rm SO}(3))=\pi_{1}({\rm RP}^{3})=\mathbb{Z}_2$.
Now to the physics! What does the physics care about loops in ${\rm SO}(D)$? Let $t$ denote the time. How can we describe the exchange of two particles? The answer is by a curve $\gamma : [0,1]\rightarrow {\rm SO}(D)$ that describes the rotation of the two particles in the center-of-mass frame. This is a loop, because a full rotation of $2\pi$ is equivalent to doing nothing. Therefore, the number of topologically distinct loops is in fact the number of the different statistics possible. See also the following beautiful illustration taken from this Wikipedia page.


Anticlockwise rotation $\qquad\qquad\qquad$ Clockwise rotation
To quote the caption of this figure from Wikipedia
Exchange of two particles in $2 + 1$ spacetime by rotation. The rotations are inequivalent, since one cannot be deformed into the other (without the worldlines leaving the plane, an impossibility in $2D$ space).