The lunar phases are produced as a result of the change of the relative positions of the Earth, the Moon and the Sun.
The part of the lunar surface illuminated by the Sun that we can see from the Earth, is changing throughout a cycle that is repeated periodically every 29 days, 12 hours, 43 minutes and 12 seconds.
The answer is: Earth revolving around the sun and the sun's light being reflected off the moon.