The monthly cycle of the moon (we won't capitalize the word here) must have mystified early humans — “waxing" from thin crescent (“new moon") to half-moon, then to a “gibbous" moon and a full one, and afterwards “waning" to a crescent again. That cycle, lasting about 29.5 days, gave us the word “month" --- related to “moon," as is “Monday."
The civil year, January to December, no longer ties its months to the moon, but some traditions still do and their terms for “month" reflect the connection --- in Arabic, “shahr,” in biblical Hebrew “yerach" and also “chodesh" from “new," since it was reckoned from one new moon to the next. Jericho (pronounced Yericho), one of the oldest cities on Earth, took its name from “yerach," and of course, legends tell of many moon-gods and goddesses, e.g. Artemis and Diana.
Early astronomers understood the different shapes of the moon, noting that each was linked to a certain relative position between moon and Sun: for instance, full moon always occurred when moon and Sun were at opposite ends of the sky. All this suggested that the moon was a sphere, illuminated by the Sun.
The moon's path across the sky was found to be close to the ecliptic, inclined to it by about 5 degrees. Eclipses of the Sun always occurred when moon and Sun were due to occupy the same spot in the sky, suggesting that the moon was nearer to us and obscured the Sun. Eclipses of the moon, similarly, always occurred at full moon, with the two on opposite sides of the Earth, and could be explained by the shadow of the Earth falling on the moon.
Lunar eclipses allowed the Greek astronomer Aristarchus, around 220 BC, to estimate the distance to the moon (See the chapter “Estimating the Distance to the Moon"). If the moon and the Sun followed exactly the same path across the sky, eclipses of both kinds would happen each month. Actually they are relatively rare, because the 5-degree angle between the paths only allows eclipses when Sun and moon are near one of the points where the paths intersect.
The cycle from each new moon to next one takes 29.5 days, but the actual orbital period of the moon is only 27.3217 days. That is the time it takes the moon to return to (approximately) the same position among the stars.
Why the difference? Suppose we start counting from the moment when the moon in its motion across the sky is just overtaking the Sun; we will call this the “new moon," even though the thin crescent of the moon will only be visible some time later, and only shortly after sunset. Wait 27.3217 days: the moon has returned to approximately the same place in the sky, but the Sun has meanwhile moved away, on its annual journey around the heavens. It takes the moon about 2 more days to catch up with the Sun, to the position of the next “new moon," which is why times of the new moon are separated by 29.5 days.