Prior to the Gregorian calendar the Julian calendar was widely used. The Julian calendar had a leap year every four years. With the actual period of our orbit around the sun being 365.24219 days, there was a slow shifting of the seasons, until by the sixteenth century events such as the autumnal equinox were occurring up to ten days earlier than they were when the Julian calendar was introduced. The Gregorian calendar changed the rule for the century years so that they would not be leap years unless they were divisible by 400.
The new calendar was adopted in Catholic countries in 1582. Ten days were dropped to bring the seasons back into line. October 4 was immediately followed by October 15, with no dates in between. The United Kingdom and its colonies, which at the time included areas of North America, made the change in 1752 with the dropping of eleven days (September 2 was immediately followed by September 14).
NOTE
Every fourth year is a leap year except those that are also divisible by 100. However, those years divisible by 400 are leap years. So the year 2000 is a leap year; 1900 and 2100 are not.