Most of the elements in nature are stable and do not change.
If there are a lot of atoms of the original element, called the parent element, the atoms decay to another element, called the daughter element, at a predictable rate.
Radiometric dating--the process of determining the age of rocks from the decay of their radioactive elements--has been in widespread use for over half a century.
There are over forty such techniques, each using a different radioactive element or a different way of measuring them.
You cannot predict exactly when any one particular grain will get to the bottom, but you can predict from one time to the next how long the whole pile of sand takes to fall.
Once all of the sand has fallen out of the top, the hourglass will no longer keep time unless it is turned over again.