As the Moon orbits the Earth, different parts of the Moon are illuminated by the Sun, and we see different amounts of the Moon's illuminated side. The amount of the Moon that we see illuminated changes throughout the month, and this is what causes the different phases of the Moon.
When the Moon is between the Earth and the Sun, the side of the Moon facing the Earth is not illuminated, and we see a new moon. As the Moon orbits the Earth, it moves away from the Sun, and more of the Moon's illuminated side becomes visible to us. This results in the different phases of the Moon, including the waxing crescent, first quarter, waxing gibbous, full moon, waning gibbous, third quarter, and waning crescent phases.
The cycle of the Moon's phases repeats itself every 29.5 days, which is the time it takes the Moon to complete one orbit of the Earth.