Neither the Earth nor the Moon have any light of their own but, as they orbit the Sun, they are illuminated by light from it. The way we see this illumination produces the phases of the Moon.
The lunar month
The Moon revolves around the Earth in 27 days, 7 hr, 43 min and 11.6 sec. This is called a sidereal month. However, because the Earth is also moving around the Sun, the time it takes for the Moon to make a complete orbit and return to the same phase (i.e. have the same illumination when seen from the Earth) is a little longer – 29 days, 12 hr, 44 min and 2.8 sec.