However, the time it takes for the Moon to cycle through its phases (from new moon to full moon and back again) is slightly longer, about 29.5 days. This is called the synodic month.
The difference is due to the fact that the Earth is also moving around the Sun, so the Moon needs to travel slightly further to catch up to the same position relative to the Sun.