The following types of months are mainly of significance in astronomy, most of them (but not the distinction between sidereal and tropical months) first recognized in Babylonian lunar astronomy.
A synodic month is longer than a sidereal month because the Earth-Moon system is orbiting the Sun in the same direction as the Moon is orbiting the Earth. The Sun moves eastward with respect to the stars (as does the Moon) and it takes about 2.2 days longer for the Moon to return to the same apparent position with respect to the Sun.
An anomalistic month is longer than a sidereal month because the perigee moves in the same direction as the Moon is orbiting the Earth, one revolution in nine years. Therefore, the Moon takes a little longer to return to perigee than to return to the same star.
A draconic month is shorter than a sidereal month because the nodes move in the opposite direction as the Moon is orbiting the Earth, one revolution in 18.6 years. Therefore, the Moon returns to the same node slightly earlier than it returns to the same star.
At the simplest level, most well-known lunar calendars are based on the initial approximation that 2 lunations last 59 days: a 30-day full month followed by a 29-day hollow month — but this is only roughly accurate, and eventually needs correction by using larger cycles, or the equivalent of leap days. Additionally, the synodic month does not fit easily into the year, which makes accurate, rule-based lunisolar calendars complicated. The most common solution to this problem is the Metonic cycle, which takes advantage of the fact that 235 lunations are approximately 19 tropical years (which add up to not quite 6940 days). However, a Metonic calendar will drift against the seasons by about 1 day every 200 years. Metonic calendars include the calendar used in the Antikythera Mechanism about 2000 years ago, and the Hebrew calendar.