The second is the base unit of time, and every other unit is a multiple of it. Since 1967 it has been defined as 9,192,631,770 cycles of the radiation from a caesium-133 atom.
There are 60 seconds in a minute, 60 minutes in an hour and 24 hours in a day, so divide by 60 to go from seconds to minutes or minutes to hours, and by 24 to go from hours to days. A day is 86,400 seconds.
Why are there 24 hours in a day?
The 24-hour day is Egyptian: they split daylight into 12 hours and the night into 12. The base-60 split of hours into minutes and seconds is Babylonian in origin, and the two were only combined later by Greek astronomers.
The Egyptians divided the day into 12 hours of daylight and 12 hours of darkness, which gave the 24-hour day. The Babylonians' base-60 system gave the division of hours into minutes and seconds. This division was likely influenced by the observation of celestial bodies, such as the sun and the moon, which provided a natural rhythm for measuring time. It gradually spread to other civilizations, including the Greeks and the Romans, and eventually became widely accepted.
The 24-hour day has lasted partly because 24 divides evenly into halves, thirds, quarters, sixths and eighths. Decimal time, with 10-hour days, was tried in revolutionary France in 1793 and abandoned in 1795.
Why are there 60 minutes in an hour and 60 seconds in a minute?
The 60 in minutes and seconds comes from the sexagesimal (base-60) number system of the Sumerians, in use around 2000 BCE and passed on to the Babylonians. The same system gives the 360° circle, although the 24-hour day is Egyptian.
The choice of using 60 as the base for time measurement can be attributed to its divisibility. The number 60 has many factors, including 1, 2, 3, 4, 5, 6, 10, 12, 15, 20 and 30. This divisibility made calculations and conversions easier for ancient astronomers and mathematicians.
The sexagesimal system passed from the Sumerians to the Babylonians and then to Greek astronomers, who used it for fractions of a degree. Medieval scholars later extended it to the hour, which is how we got minutes and seconds, even though the underlying reasons for choosing 60 may have been lost to history.
Metric time
Decimal time divides the day into 10 hours of 100 minutes of 100 seconds, so a day has 100,000 decimal seconds, each lasting 0.864 of an ordinary second.
Decimal time was the official time in France for under two years, from 1793 to 1795. Clockmakers made decimal watches, but the public mostly ignored them. Swatch tried again in 1998 with Internet Time, 1,000 ".beats" a day, which did not catch on either.
Unix time
Unix time (also called POSIX or epoch time) is the number of seconds since 00:00:00 UTC on 1 January 1970, stored as a single number. Systems that store it as a signed 32-bit integer run out at 03:14:07 UTC on 19 January 2038.
Because Unix time is a single integer, time arithmetic is plain subtraction: take one value from another and you have the seconds between them. File timestamps and scheduled events are commonly stored this way.
Unix time ignores leap seconds, the extra seconds occasionally added to UTC to keep it in step with the Earth's rotation. Every Unix day is counted as exactly 86,400 seconds, even a day that really has 86,401.