Pope Gregor VII. reformed, or corrected, the calendar used throughout the world. The correction was due to the deviation of the "true" astronomical time, or year, from the previously used Julian calendar, which had been used since its introduction by Julius Cesar in 46 B.C..
In Julian calendar, the length of the year had been assumed to be 365.25 days, with every fourth year being a leap year, with an extra day (February 29) to bring its legth to 366 days, compared to the 365 days of the "common" year. AS the "true" year uis a bit shorter, there is an error in that calendar, which summed up to days over the centuries.
This error was noted in the 13th century because of the calculation of the Easter date (which is defined to be the sunday after the first Full Moon in spring). Therefore, in 1414, Pope John XIII. decided to reform the calendar; gowever, due to various difficulties, this reform was delayed. Eventually, it was Pope Gregor XIII., who conducted this reform in 1582 with the help of the astronomer Luigi Lilio, after reaching a consent of Catholic rulers, on February 24, 1582.
The original Gregorian reform was to leave out the number of accumulated "error" days, which had summed up to 10, between (Julian) October 4, 1582 and (Gregorian) October 15, 1582. For the future, it was necessary to leave out three leap days in four centuries, so that the years 1700, 1800, and 1900 were common years while 1600 and 2000 were leap years. This rule means that century years are taken as common years and leave out their leap day, unless they are divisable by 400.
The reform was immediately effective thoughout the Catholic world, including France, Italy, Spain, and the Catholic part of Germany. For the rest of the world, it took considerable time to be taken over: German protestants switched to the Gregorian Calendar on March 1, 1700, England and "Her" colonies in September 1752, and eventually Russia and the Orthodox world in 1900, when they had to leave out a total of 13 days.
It may be noted that also the beginning of the year, the New Years Day, had been observed on different days throughout the world: Observations included December 25, March 1, and in England, March 25. This was switched to January 1 in 1500 e.g. throughout France and Germany, in England in 1752, and only in 1700 in Russia.