Sometimes this is easier to understand with numeric examples.

We're talking about X, first we need to see X as odd, so let's set X to 5:

5 / 2 = 2 with a remainder of 1

Simple enough, let's set X to 3 to see another odd:

3 / 2 = 1 with a remainder of 1

Notice that both times that X is odd and we divide by 2 we get a remainder of 1. In fact this is always the case with odd numbers, 27 for instance:

27 / 2 = 13 with a remainder of 1 <<<< Again we get a remainder of 1

Now, let's contrast this with even numbers. So let's set X to 4:

4 / 2 = 2 with a remainder of 0 <<<< And here is the difference

Let's set X to 10, another even number:

10 / 2 = 5 with a remainder of 0 <<<< Again, even numbers give us a remainder of 0

To modulate, for your purposes, gives the remainder of a division problem.

X % 2 is the same as asking, What is the remainder left over when I divide X by 2?

When you modulate by 2 you will always get a 1 or a 0 as the answer. A 1 tells you that the number you modulated by is odd and a 0 tells you that it's even.

To extend your understanding and explore modulus more try modulating numbers by 10 and 100 and see what results you get.