Leap years occur in years divisible by 4 unless the year is divisible by 100. However, years divisible by 400 are leap years.
From Wikipedia:
The leap day was introduced as part of the Julian reform. The day following the Terminalia (February 23) was doubled, forming the “bis sextum”—literally ‘double sixth’, since February 24 was ‘the sixth day before the Kalends of March’ using Roman inclusive counting (March 1 was the ‘first day’). Although exceptions exist, the first day of the bis sextum (February 24) was usually regarded as the intercalated or “bissextile” day since the third century. February 29 came to be regarded as the leap day when the Roman system of numbering days was replaced by sequential numbering in the late Middle Ages.

