Most years, the last minute of December 31 ends with 23:59:59, and then the new year begins with 00:00:00. But a few times, clocks around the world have done something odd. After 23:59:59 they showed 23:59:60, one extra second, before the new year began. That extra second is called a leap second.
To understand why, remember that Earth is a kind of clock. It spins once about every day, and for most of history people measured time by the Sun's position in the sky. In the twentieth century, scientists built atomic clocks. These count the incredibly steady vibrations of atoms, and the best ones would lose less than one second in many millions of years.
The trouble is that Earth does not spin perfectly steadily. The Moon and Sun pull on the oceans and make tides, and the tides act like a very weak brake, so Earth's spin slows a tiny bit over time. Changes in the oceans, the air and the inside of the planet can also nudge the spin. Atomic clocks keep time almost perfectly, but Earth wanders a little.
An international group of experts keeps watch on Earth's rotation. When Earth time and atomic time drift close to one second apart, the experts announce a leap second. It is added at the very end of June 30 or December 31. The first was added in 1972. In all, 27 leap seconds have been added, and the most recent came at the end of 2016.
Leap seconds are not easy for computers. Many computer systems expect every minute to have exactly sixty seconds, so a sixty-first second has caused problems for some of them. In 2022, representatives of many countries voted to stop adding leap seconds by the year 2035. Clocks will then follow atomic time alone, and the small gap with Earth's spin will be allowed to grow.