The waxing and waning of the moon, or the phases of the moon, are caused by the changing angles at which we view the sunlit portion of the moon as it orbits the Earth. The moon itself doesn't produce light; it reflects sunlight, and the amount of the illuminated side we see from Earth changes depending on the moon's position. 
Here's a more detailed explanation:
  • The Moon's Orbit:
    The moon orbits the Earth, and as it does, the angle between the sun, Earth, and moon changes. 
  • Sunlight Reflection:
    The sun always illuminates one half of the moon. 
    • Varying Perspectives:
      As the moon orbits, we see different amounts of the sunlit side, leading to the various phases we observe. 
    • Waxing:
      When the illuminated portion of the moon appears to be growing larger, it's called waxing. This happens as the moon moves from the new moon phase (dark) towards the full moon phase (fully lit). 
    • Waning:
      When the illuminated portion of the moon appears to be shrinking, it's called waning. This happens as the moon moves from the full moon phase back towards the new moon phase.