A leap second is a one-second adjustment to civil time in order to keep it close to the mean solar time.
Civil clock time is based on "Coordinated Universal Time" (UTC), which is maintained by extremely precise atomic clocks. In contrast, the rotation of the Earth, measured by the UT1 timescale, is irregular; the solar day is gradually but unevenly becoming longer, mainly due to the tidal acceleration of the Moon. In order to keep solar time close to civil time, UTC is corrected by a leap of 1 second.
The instruction to insert a leap second will be given whenever the difference between UTC and UT1 is expected to exceed 0.9 s. After UTC 23:59:59, an additional second at 23:59:60 is counted, before the clock jumps to 00:00:00 of the next day. Negative leap seconds are also possible if the Earth's rotation becomes slightly faster, but this has never happened. In that case, 23:59:58 would be followed by 00:00:00.
Leap seconds can occur only at the end of a month, and have only ever occurred at the end of a 30 June or 31 December. Unlike leap days, they occur simultaneously worldwide; for example, a leap second on 31 December will be observed as 7:59:60 pm U.S. Eastern Standard Time.
Historically, leap seconds have been inserted about every 18 months. However, as the slowing of the Earth is irregular, it is not possible to predict more than a relatively short time in advance whether a leap second will have become necessary. Between January 1970 and November 2001, the IERS gave instructions to insert a leap second on 22 occasions. The most recent leap second was 1998-12-31 23:59:60 UTC; the interval since then has been the longest period without a leap second.
It is the responsibility of the International Earth Rotation and Reference Systems Service to measure the Earth's rotation and determine whether a leap second is necessary. Their determination is announced in Bulletin C, published every six months.