The Moon doesn't emit (give off) light itself, the 'moonlight' we see is actually the Sun's light reflected off the lunar surface. So, as the Moon orbits the Earth, the Sun lights up different parts of it, making it seem as if the Moon is changing shape.