A leap year occurs almost every four years on February 29. In order for a year to be a leap year, it must be evenly divisible by 4; however, if the year is evenly divisible by 100, it is not a leap year unless it is also evenly divisible by 400, in which case it is a leap year. This means that 1700, 1800 and 1900 were not leap years, but 2000 was a leap year.
The actual length of a year, defined by the amount of time it takes for the Earth to make a complete circle around the sun, is 365.24 days. The Gregorian calendar normally contains 365 days in a year. This is about a quarter of a day less than the actual number of days in a year, so an extra day is added to the calendar almost every four years to correct the situation.