I'm trying to test the logistic map $x_{i+1}=\mu x_i (1-x_i)$ for randomness. To do this, I need to set $\mu=4$ and then use this randomness test:
However, I don't understand what the $k$th moment means. I see that the summation is over $i$, so then what does the $k$ signify in the summation?

You get to choose $k$. Each different $k$ gives a different test. You can average the squares of the $x_i$ with $k=2$, average the tenth powers with $k=10$ or whatever you like. The point is that if $P(x)=1$ the integral is as stated for each $k$. If the $x$s are biased high, the integral will be higher that that. If the $x$s are biased low, the integral will be lower. Once you write a program to do this, it is easy to accumulate the data for a number of $k$s at once and compute the average.
As an aside, I claim it is a serious error to state that meeting this criterion means your generator is uniform or random. If the generator is uniform you will satisfy this, but (for any fixed set of $k$s) there are nonuniform distributions that will also satisfy it. Testing whether the distribution varies as $1/{\sqrt N}$ is very problematic, so using it for testing randomness (however defined) is a bad idea.