A leap second is an extra second occasionally added to UTC to keep atomic time within 0.9 s of Earth's rotation. 27 have been inserted since 1972 — the last on 31 December 2016 — and the practice will be retired by 2035.
UTC is kept by atomic clocks, which are far more stable than Earth's rotation. Tidal friction gradually slows the planet, so solar time (UT1) drifts behind atomic time. When the difference approaches 0.9 seconds, the IERS (International Earth Rotation and Reference Systems Service) schedules a leap second — inserted at 23:59:60 UTC on 30 June or 31 December.
No leap second has been needed since 2016 — Earth's rotation has actually sped up slightly in recent years, prompting discussion of a possible negative leap second (never yet used).
In 2022 the General Conference on Weights and Measures (CGPM) voted to stop inserting leap seconds by 2035, because irregular 61-second minutes break computer systems (notable outages hit major websites in 2012 and 2017).
Source: IERS Bulletin C. All insertions were positive (an added second); a negative leap second has never been used.