Gregory XIII conducted a reform of the calendar through his bull Inter gravissimas, issued on 24 February 1582. The bull prescribed that the date 4 October was to be followed by 15 October, i.e. that 10 days were to be simply skipped. The scientists and astronomers who were responsible for advising Pope Gregory XIII regarding the reforms were Christopher Clavius and Aloysius Lilius.
Why was the calendar reform introduced in the first place? Namely, the problem is that the Earth doesn’t complete its rotation around the Sun in exactly 365 days, but 365 days, 5 hours, 48 minutes and approximately 45 seconds. The former Julian calendar resolved that problem by introducing a leap year, which adds an additional day every fourth year. The problem was that, in that way, the year was corrected to last 365 days and six hours, which is 11 minutes and 15 seconds too long.
These 11 minutes and 15 seconds piled up every year when the Julian calendar was in use, so that there was a significant number of excess days by 1582. Even the dates of the seasons were moved because of this. It is interesting that the goal of the Gregorian reform was to move the date back to the state which existed in 325, at the time of the First Council of Nicaea. Since 1582 minus 325 equals 1257 years, it is necessary to multiply this number by 11 minutes and 15 seconds. The result is around 10 days, which were simply skipped after this day in 1582.
The new Gregorian calendar was corrected so that the additional 11 minutes and 15 seconds no longer appear each year. This was done so that the leap year would no longer be every fourth one, but only the ones which are not also divisible with 100. However, the ones dividable with 400 would remain leap years. Thus, year 1900 wasn’t a leap year even though it is divisible by 4, but the year 2000 was.