The mechanics of the leap year are well known: We add a day to February every four years to maintain the synchronization of our earthly calendar with the celestial reality of the Earth's orbit.
Weeelllll, it turns out that a similar phenomenon plays out on a much smaller time scale. Along with the leap year, there is the leap second.
Here, let Demetrios Matsakis explain. He's the chief scientist for time services at the US Naval Observatory and the star of one of the best videos you're ever going to watch, Where Time Comes From (which I've embedded above). This is an outtake from that video, which was produced by the genius Katherine Wells.
"Until 1971, our standard of time was the rotation of the Earth," Matsakis says. "One turn of the Earth was one day, divided into hours, minutes, and seconds."
This version of time, variability included, has a name: Universal Time 1, or UT1. So, 86,400 seconds in a day (24*60*60). Simple.
But scientists who had been working with atomic clocks already knew that the length of a day, as measured by the Earth's rotation, was variable. In any given rotation, the sun may be off from our perfect temporal abstraction by a tenth of a millisecond. A day, as measured by a rotation, might be 86,400.0001 seconds or 86,399.9999 seconds.