In order for this to converge, we need integrability near $x = \pm \infty$. For large $x$, the integrand is asymptotic to $\frac{1}{x^{2-k}}.$ The integral of $\frac{1}{x^{2-k}}$ converges at $\infty$ iff $2-k > 1$ which is the same as $k < 1$. Thus the integral is divergent for $k \ge 1$ so the moment is infinite (or does not exist). I've assumed here that $k \ge 0$ is assumed. Without this, we would need absolute values: $$E(\lvert X\rvert^k) = \int^\infty_{-\infty} \frac{\lvert x \rvert^k}{\pi(1+x^2)}dx$$ and we would also need to concern ourselves with convergence near $x = 0$. Indeed, this integral converges for $-1 < k < 1$.
EDIT: If you take the integral in the principal value sense: $$E(X^k) = p.v. \int^\infty_{-\infty} \frac{x^k}{\pi(1+x^2)}dx = \lim_{L \to \infty }\int^L_{-L} \frac{x^k}{\pi(1+x^2)}dx$$ then the odd moments are all zero since $\frac{x^k}{1+x^2}$ is an odd function for odd $k$.
EDIT 2 (Addressing the question in the comment): Of course you can't have $$\lim_{x\to \infty} \frac{1+x^2}{x^k} = \frac{1}{x^{2-k}};$$ this doesn't make sense (if we take the limit with respect to $x$, the result certainly cannot depend on $x$ anymore). What I mean by $\frac{x^k}{1+x^2}$ is asymptotic to $\frac{1}{x^{2-k}}$ is that there are constants $c, C > 0$ such that $$\frac{c}{x^{2-k}} \le \frac{x^k}{1+x^2} \le \frac{C}{x^{2-k}}, \,\,\,\, \text{ for all } x \text{ sufficiently large}.$$ In this case, we now that for all $x > 0$, we have $$\frac{x^k}{1+x^2} \le \frac{x^k}{x^2} = \frac{1}{x^{2-k}}.$$ Further, for $x \ge 1$, we have $$2x^2 \ge 1+x^2 \,\,\, \implies \,\,\,\, \frac{1}{1+x^2} \ge \frac{1}{2x^2}.$$ Thus, $$\frac{x^k}{1+x^2} \ge \frac 1 {2x^{2-k}}.$$ Hence for all $x \ge 1$, we see $$\frac{1}{2x^{2-k}} \le \frac{x^k}{1+x^2} \le \frac{1}{x^{2-k}}$$ so we can take $c = 1/2, C =1$. Then you can use the comparison test to show that the given integral converges iff the integral of $\frac{1}{x^{2-k}}$ converges.