Historically, the second was defined based on the Earth's rotation. However, with the advent of extremely precise modern atomic clocks, the definition was changed in 1967. A second is currently defined as being the duration of 9,192,631,770 periods/oscillations of radiation from a Cesium-133 atom at the ground state (blah blah science words blah blah).

The speed of Earth's rotation varies, while atomic clocks are unwavering. On an average day, the difference is around 0.002 seconds, which amounts to approximately 1 second per 500 days. In order to synchronize the atomic clocks with the Earth's observed rotation, the atomic clocks are occasionally instructed to add an extra second – the Leap Second.

So, on New Year's Eve, kick back, relax, and enjoy your extra second. I know I will.