A mechanism powered by a coiled spring and regulated by some form of escapement; the power is transmitted through toothed gearwheels and used to drive a mechanical clock, toy, or other device
If you say that something happens like clockwork, you mean that it happens without any problems or delays, or happens regularly. The Queen's holiday is arranged to go like clockwork, everything pre-planned to the minute