What exactly is Leap Year?

The leap year is a contrivance so that the calendar year, which is approximately 365 days in length, matches the solar or astronomical year.
An astronomical year is measured by the time it takes the earth to make exactly one revolution around the sun, which is not an exact and precise 365 days. Instead, scientists in the field estimate that the actual time it takes for the earth to revolve around the sun is closer to 365.25 days.
One might not give much thought to the extra .25 (approximately six hours or 1/4 of a day) and think it does not matter in the grand scheme of things. However, if this amount of time were not taken into consideration, the calendar would lose a full day against the seasonal year. Christmas day, December 25, would begin to occur a little earlier every year.
After about 20 years, Christmas would come before the winter solstice; after 200 years or so, Christmas would take place during autumn (since the seasons are tied to the astronomical year, because they depend on the earth’s slant relative to the sun) and then in summer and so forth.
In order to prevent this deviation between the calendar year and the astronomical (seasonal) year, we add one extra day every four years. Over the four-year period, we end up with a total of 1461 calendar days, instead of 1460, which averages out to roughly 365.25 days per year.
Julius Caesar introduced leap years in the Roman Empire more than 2,000 years ago, but the Julian calendar had only one rule: any year evenly divisible by four would be a leap year. This led to way too many leap years.
The anomaly was corrected more than 1,500 years later by Pope Gregory in March 1582 with the introduction of the Gregorian calendar.
How does the Gregorian system work? We still have a leap year every four years, to accommodate the almost six-hour difference that was known in Julius Caesar’s time. The Gregorian correction is that every hundred years, we make it not a leap year. Thus, 1700, 1800, and 1900 were not leap years, even though they would have been in the normal four-year cycle. Every 100 years, there are 24 leap years, not 25. This allows the calendar year average 365.24 days each year.
However, there are still some extra seconds we have to work with. The accepted rule we use to determine Leap years is as follows:
Every year divisible by 4 is a leap year (adds an extra day to February).
EXCEPT the last year of each century, such as 1900, which is NOT a leap year. 
EXCEPT when the number of the century is a multiple of four, such as 2000, which IS a leap year.
EXCEPT the year 4000 and its later multiples (8000, 12000, etc) which are NOT leap years.
The Jewish calendar is based on a lunar cycle — that is, each month is based on the interval, about 29 or 30 days, from new moon to new moon — so it’s short by about 11 days per solar year. Since the Jewish holidays are supposed to be season-related (they were originally harvest festivals), the calendar adjusts by adding a whole month about every three years — actually, seven times every 19 years. The calculations are precise but extremely complicated.
The Muslim calendar is also lunar, but it doesn’t adjust. The holidays come about 11 days earlier in the season each year. During some years Ramadan might take place in the spring, then in the winter, then in fall, and so on.