The Moon takes approximately 29.5 days to complete a full cycle of phases. This period is called a synodic month, or lunation, and its mean length is about 29.53059 days—29 days, 12 hours, 44 minutes, and a few seconds.
The cycle runs from one new Moon through the waxing crescent, first quarter, waxing gibbous, full Moon, waning gibbous, last quarter, and waning crescent before returning to new Moon. The phases depend on the changing angle between the Sun, Moon, and Earth, not simply on how long the Moon takes to circle Earth relative to the stars.
That distinction explains a common mix-up. The Moon’s sidereal orbital period is about 27.3 days, measured against distant stars. Because Earth moves along its own orbit around the Sun while the Moon travels around Earth, the Moon must move a little farther before the Sun-Moon-Earth geometry repeats. The visible phase cycle therefore lasts about two days longer.