Clocks
How long is a day?
It's the amount of time it takes for the Earth to rotate one time on its axis. But how long does it take the Earth to rotate? That is where things become completely arbitrary. The world has decided to standardize on the following increments:
 A day consists of two 12hour periods, for a total of 24 hours.
 An hour consists of 60 minutes.
 A minute consists of 60 seconds.
 Seconds are subdivided on a decimal system into things like "hundredths of a second" or "millionths of a second."
That's a pretty bizarre way to divide a day up. We divide it in half, then divide the halves by twelfths, then divide the twelfths into sixtieths, then divide by 60 again, and then convert to a decimal system for the smallest increments. It's no wonder children have trouble learning how to tell time.
Why are there 24 hours in a day?
No one really knows. However, the tradition goes back a long way. Take, for example, this quote from Encyclopedia Britannica:

The earliest known sundial still preserved is an Egyptian shadow clock of green schist dating at least from the 8th century BC. It consists of a straight base with a raised crosspiece at one end. The base, on which is inscribed a scale of six time divisions, is placed in an eastwest direction with the crosspiece at the east end in the morning and the west end in the afternoon. The shadow of the crosspiece on this base indicates the time. Clocks of this kind are still in use in primitive parts of Egypt.
The Babylonians seem to be the ones who started the six fetish, but it is not clear why.
Why are there 60 minutes in an hour and 60 seconds in a minute?
Again, it is unclear. It is known, however, that Egyptians once used a calendar that had 12 30day months, giving them 360 days. This is believed to be the reason why we now divide circles into 360 degrees. Dividing 360 by 6 gives you 60, and 60 is also a base number in the Babylonian math system.
What do a.m. and p.m. mean?
These abbreviations stand for ante meridiem, before midday, and post meridiem, after midday, and they are a Roman invention. According to Daniel Boorstin in his book The Discoverers, this simple division of the day into two parts was the Romans' first increment of time within a day:

Even at the end of the fourth century B.C., the Romans formally divided their day into only two parts: a.m. and p.m. An assistant to the consul was assigned to notice when the sun crossed the meridian, and to announce it in the Forum, since lawyers had to appear in the courts before noon.
Modern man bases time on the second. A day is defined as 86,400 seconds, and a second is officially defined as 9,192,631,770 oscillations of a cesium133 atom in an atomic clock.