The calendar which the nations use today the Gregorian Calendar was introduced in 1582 by Pope Gregory XIII.
Why Gregorian calendar over Julian Calendar? A Julian Year is 365.25 days long. However in reality a tropical year was a few minutes shorter than 365.25 days, which the Julian Calendar did not fix. Because of this discrepancy easter dates got drifted further from the original time of the year as it was introduced by the church.
As per Gregorian calendar an year has 365.2425 mean solar days. With this precision Gregorian calendar will drift by 1 day only per 7,700 years as compared to the Julian Calendar which was drifting by 1 day every 128 years.
In Gregorian calendar, years that are divisible by 4 is a leap year. Also the years that are divisible by 400 are leap years. However if the year is divisible by 100 it is a not a leap year.
e.g.,2000, 2004, 2008, 2012 are all leap years 2400, 2800 are leap years 2300,2500 are not leap years
When introduced, the new calendar was not immediately followed across Europe. It took until 18th century for the Europe to follow Gregorian calendar as different nations adopted to Gregorian calendar at different years.