Since Biblical times, the months and years of the Jewish calendar have been established by the cycles of the moon and the sun. The traditional law states that the months shall follow the course of the moon from its birth (Molad) to the next New Moon (Rosh Hodesh).
In addition, the lunar months must always correspond to the seasons of the year, which are governed by the sun. For example, Passover in the month of Nisan must occur in the spring and Sukkot in the month of Tishrei must be in the fall. Thus, our Jewish calendar is lunar-solar. It contrasts to our civil calendar (Gregorian) which is purely solar and where the months have lost their relation to the Moon and to the Mohammedan calendar which is strictly lunar where the months wander through all four seasons during the period of 33 years. This accounts for the complicated nature and structure of the Jewish calendar.
Since a solar year of about 365 days is 11 days longer than 12 lunar months, the Jewish calendar is faced with the problem of balancing the solar with the lunar years. After two or three years when the excess of 11 days had accumulated to approximately 30 days, a thirteenth month Adar 2 was added before Nisan to ensure that Nisan and Passover would occur in the spring and not the winter. It was the famous leader Hillel in the 4th century who formally sanctified all months in advance and calculated all future leap years in order to preserve the unity of the Jewish people.