In the following example, taken from the Stewart's Calculus book, we are told that to differentiate the formula for volume, we need to use the chain rule:
In order to connect $dV/dt$ and $dr/dt$, we first relate $V$ and $r$ by the formula for the volume of a sphere:$$V=\frac43\pi r^3$$ In order to use the given information, we differentiate each side of this equation with respect to $t$. To differentiate the right side, we need to use the Chain Rule: $$\frac{dV}{dt}=\frac{dV}{dr}\frac{dr}{dt}=4\pi r^2 \frac{dr}{dt}$$
I don't understand why, since on the right side we don't have a composite function ($\frac{4}{3} \pi$ is simply a constant). Can somebody please explain this?

You do have a composite function, since $V$ depends on $r$, where $r$ depends on $t$. So in the end $V$ depends on $t$: $$ V = \tfrac{4\pi}{3} r(t)^3 . $$