A leap year, in the Gregorian and Julian calendars, is a year containing 366 days instead of the ordinary 365. Normally, this occurs every four years, where February has an extra day, bringing the number of days in that month to 29. Leap years occur when a year's number is a multiple of 4 (1992, 2144, 1852, etc.). However, when a year's number is a multiple of 100, it is only a leap year if the number is also a multiple of 400. Thus 1900 was not a leap year while 2000 was and 2100 will not be.
Leap year takes place because the earth takes about 365.25 days to complete one rotation around the sun. Therefore, every four years the earth ends up a full day's travel short of one rotation. Making things slightly more complicated, however, is the variety of definitions for a year. In general, those using the Gregorian Calendar go by the Tropical year, which measures from equinox to equinox, resulting in 365.24219 days per year. However, a Sidereal year (based on relative star location) measures at 365.25636 days, and an Anomalistic year (based on least distance from the sun) measures a year as 365.25964 days. Although the variations are minor, they can make a significant difference over time.