In computing the partition function, equation 2.17 is an integral over $d\bf{r}$ and $d\bf{p}$ -- over all of the phase space volume that is defined by the particle's coordinates $q$ and $p$. The quantity $d\bf{r}$ $d\bf{p}$ is a differential volume in phase space. This describes 3 coordinates for each of the $N$ particles, so you have $3N$ dimensions to integrate over, for both $q$ and $p$.
Another way of writing the differential phase space volume in the partition function would be
$$ d\mathbf{q}d\mathbf{p} = d^{3N}q\, d^{3N}p$$
We can use this to integrate over and find our partition function, but the caveat is that your result is not dimensionless, despite the fact that the partition function should have no units (e.g., the Boltzman factor in the canonical ensemble -- the integrand -- would be unitless). Therefore, we instead integrate over
$$ \frac{d^{3N}q\, d^{3N}p}{h^{3N}}$$
since the Planck constant has the equivalent unit of phase space volume. Simply, it is a correction for units, ensuring that our answer for the partition function makes good physical sense (by not having units!).