The integral $\int_0^\infty {1\over x^p}\, dx$ is improper in two ways: the interval of integration is infinite and the integrand "blows up" at 0. Thus, you need to split it up: $ I=\int_0^\infty {1\over x^p}\, dx= \underbrace{\int_0^1 {1\over x^p}\, dx}_{I_0}\ +\ \underbrace{\int_1^\infty {1\over x^p}\, dx}_{I_\infty} $
Then the integral $I$ converges if and only if both of the integrals $I_o$ and $I_\infty$ converge. If $I$ converges, it converges to the value of $I_0+I_\infty$. Note that to show $I$ diverges (if it does) it suffices to show that one of $I_o$ or $I_\infty$ diverges.
If you have the $p$-test in hand, this should be an easy problem. Consider the integral $I_\infty$ for $p\le1$, and consider the integral $I_o$ for $p>1$.
If you don't have the $p$-test in hand, you'd compute: $\tag{1} I_0=\int_0^1 {1\over x^p}\, dx=\lim_{a\rightarrow0^+} \int_a^1 {1\over x^p}\, dx $ and $\tag{2} I_\infty=\int_1^\infty {1\over x^p}\, dx =\lim_{b\rightarrow\infty} \int_1^b {1\over x^p}\, dx $
The integral $I_o$ or $I_\infty$ converges if and only if the respective limit above converges.
It would be best here to consider three cases: $p>1$, $p<1$, and $p=1$. A hint here (as above) is to consider $I_o$ for $p>1$ and $I_\infty$ for the other cases.