Because the earth orbits the sun and the moon orbits the earth at the same time. So half the moon is in the dark while the other is in sunlight. The name for this is called a lunar eclipse...
The moon has a phase every 7 days and 8 hours, they way this adds up over a period of time is, there will be 2
full moons in one month, this is referred to as a "BLUE" moon
full moons in one month, this is referred to as a "BLUE" moon