How does a mechanical clock keep accurate time, and what are the key components that ensure its precision?