In October 1582, Pope Gregory XIII issued a papal bull specifying that the Gregorian Calendar be used henceforth.
The Gregorian Calendar made years divisible by 100 but not 400 non-leap years. In order to correct for the accumulated error, 10 days were skipped, so that the day after October 4 was October 15.
Most of the Catholic countries adopted the Gregorian Calendar quickly.