From The Gospel According To Newton : An object in motion tends to stay in motion unless acted upon by an outside force. Now, apply this to the Earth. The Earth is a big spinning rock. But that rock has oceans of air and water on it that are somewhat independent of the rock; as tides show, other planetary (outside) forces act on them. And, since the wind blows on mountain ranges and the tides cycle opposite of the direction the Earth is spinning, they are gradually, bit by bit, slowing the Earth's rotation down.

Each century, each solar day gets longer by 1.2 milliseconds.

Seems like small change, right? It used to be. But now that we run off of atomic clocks that are accurate to 10 femtoseconds, it's kind of important to know that the Earth's way of keeping time (rotating on its axis) is much less accurate then mankind's best technology. But, since the day is defined off of the Earth's rotation, and the second is not defined off of the day, the 'leap second' becomes a necessity.

The second was standardized in 1967 as

    the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the cesium 133 atom
which means that the second is now fully independent from the day. But we still expect 60 seconds a minute, 60 minutes an hour, and 24 hours a day, so to correct for the Earth slowing down and making each day a millisecond longer, a leap second is added on to some years. At the stroke of midnight on the New Year, the atomic clocks show 11:59:58, 11:59:59, 11:59:60, 12:00:00. And those who aren't aware of this leap but depend on to-the-second accuracy in their operations always get screwed up by this change.