The reason is, that civil clock time is based on UTC and measured with atomic clocks. The rotation of the Earth is irregular, it slows down, and is not fit for accurate time keeping. A clock day has exactly 86400 SI seconds, while the mean solar day (a product of the rotation period of the Earth, and the revolution period of the Earth around the Sun) is somewhat longer and is increasing on average. However, in order to not go out of step with day and night, UTC is corrected by a leap of 1 second whenever necessary. Thusfar (anno 2001) this has already happened 22 times since 1 Jan. 1970.
A leap second will be inserted whenever the difference between UTC and GMT becomes 0.9 s. Moreover, this is only done at the end of 31 December or 30 June. It is implemented as follows: after clock time 23:59:59, a second named 23:59:60 is counted, before the clock jumps to 0:00:00 of the next day.
It is the responsibility of the International Earth Rotation Service (IERS) to announce leap seconds: see http://www.iers.org/iers/publications/bulletins/bull_c/ . Previous events are listed on http://www.iers.org/iers/earth/rotation/utc/table2.html .