g(x) = x^2
g(-x) = (-x)^2 ... replace every x with -x
g(-x) = x^2 ... squaring a negative makes it positive
So because g(x) = g(-x) for every x, this means g(x) is an even function. For polynomials, if every exponent is even, then the entire polynomial is even as well.
Note: if a function is even, then it won't be odd or vice versa unless the function is the zero function. In other words, g(x) = 0 is both even and odd.