When we are saying that $\pi_1(S^2) = 0,$ are we speaking about a solid sphere or a hollow sphere? as far as I understand the fundamental group of a topological space is a measurement for the holes in $S^2,$ so by saying that $\pi_1(S^2) = 0,$ we mean that it has no holes? so we are speaking about a solid sphere?
Could someone clarify this to me, please?
The space $S^2$ here means a hollow sphere, and not a solid sphere (the latter is called a ball or disc in mathematics and is usually denoted by $\mathbb{B}^3$ or $D^3$).
It's better to just use the definition of $\pi_1$ rather than think of the fundamental group as a measure for the 'number of holes'. By definition, the fundamental group of a topological space is the group of the equivalence classes under homotopy of the loops contained in the space. Intuitively, you can think of homotopy as a continuous deformation. Therefore it is better to think of the fundamental group as something telling you the 'types of loops' that exist on that space.
As such, if the fundamental group is trivial, there is only one type of loop (up to homotopy). This loop must necessarily be equivalent to the trivial loop.
Now if you want to see intuitively why $\pi_1(S^2)=0$ (this is not a formal proof): Draw a picture of $S^2$. Draw any loop (based at any point) contained in $S^2$. Can you continuously deform this loop in $S^2$ fixing this basepoint (more precisely, find a homotopy) to a point? The answer here is yes, see for example the deformation of the loop on the left hand side of the image to a point:
You can do this for any loop in $S^2$, therefore the fundamental group of $S^2$ is trivial. On the other hand, the fundamental group of the circle is $\pi_1(S^1)=\mathbb{Z}\neq 0$, because there are loops in $S^1$ which you cannot continuously deform to a point (e.g. the loop $s\mapsto e^{2\pi i s}$, $s\in [0,1]$). The intuition for why the fundamental group is $\mathbb{Z}$ is because loops of $S^1$ are homotopy equivalent if and only if they have identical winding numbers.