“Some people can tell what time it is by looking at the sun. But I have never been able to make out the numbers."
(Attributed to an essay by a student in elementary school.)
The simplest sundial is a vertical stick rising from a flat horizontal surface.
As the Sun rises, passes the highest point in its path (at noon and to the south, in the northern hemisphere) and sets, the shadow rotates around the stick in a clockwise direction, and its position can be used to mark time. Indeed, it has been claimed that the “clockwise" direction in which the hands on a clock rotate was chosen for this reason.
A sundial with a vertical pointer (“gnomon") will indicate noon correctly when its shadow points north or south. [North in northern middle latitudes, south in southern ones, while near the equator it can be either way, depending on season.] However, the direction of the shadow at some other time of the day may depend on the season--its value in summer, when the Sun's path is high, may differ from what it is in winter, with Sun low above the horizon.
Such a sundial will however work equally well at all times if the pointer is slanted, to point towards the pole of the celestial sphere (go to http://www.phy6.org/stargaze/Sdial1.htm for an explanation --- but be warned, it is a bit complicated!). The angle between it and the base then equals the geographic latitude of the user.