The basic unit is obviously the day: 24 hours, 1440 minutes, 86400 seconds, each second slightly longer than the average heartbeat. The day is defined by the motion of the Sun across the sky, and a convenient benchmark is noon, the time when the Sun is at its highest (i. e. most distant from the horizon) and is also exactly south or north of the observer.
“One day" can therefore be conveniently defined as the time from one noon to the next. A sundial can track the Sun's motion across the sky by the shadow of a rod or fin (“gnomon") pointing to the celestial pole (See the chapter “Making a Sundial" for construction of a folded-paper sundial), allowing the day to be divided into hours and smaller units. Noon is the time when the shadow points exactly south (or north) and is at its shortest.
What then is the period of the Earth's rotation around its axis? A day, you might guess? Not quite.
Suppose we observe the position of a star in the sky --- for instance Sirius, the brightest of the lot. One full rotation of the Earth is the time it takes for the star to return to its original position (of course, we are the ones that move, not the star). That is almost how the day is defined, but with one big difference: for the day, the point of reference is not a star fixed in the firmament, but the Sun, whose position in the sky slowly changes. During the year the Sun traces a full circle around the sky, so that if we keep a separate count of “Sirius days" and “Sun days,” at the end of the year the numbers will differ by 1. We will get 366. 2422 “star days" but only 365. 2422 Sun days.
It is the “star day" (sidereal day) which gives the rotation period of the Earth, and it is about 4 minutes shy of 24 hours. A clockwork designed to make a telescope follow the stars makes one full rotation per sidereal day.
The clocks we know and use, though, are based on the solar day --- more precisely, on the average solar day, because the time from noon to noon can vary as the Earth moves in its orbit around the Sun. By Kepler's laws (discussed in a later section:http://www.phy6.org/stargaze/Skeplaws.htm) that orbit is slightly elliptical. The distance from the Sun therefore varies slightly, and by Kepler's second law, the motion speeds up when nearer to the Sun and slows down when further away. Such variations can make “sundial time" fast or slow, by up to about 15 minutes.
Very precise atomic clocks nowadays tell us that the day is gradually getting longer. The culprits are the tides, twin waves raised in the Earth's ocean by (mainly) the Moon's gravitational pull. As the waves travel around the Earth, they break against shorelines and shallow seas, and thus give up their energy: theory suggests that this energy comes out of the (kinetic) energy of the Earth's rotational motion.