In the middle of trying to understand how to find E(X^2).

I have read that the definition of this expectation is the integral from b to a of x^2*f(x), where f(x) is the pdf of a random variable.

What direction should I take in developing my understanding of the background to this definition?

Many thanks in advance all!