A mainspring stores energy. Left alone, it would unwind in a few seconds and spin every wheel in the watch like a top. The escapement is the part that stops that from happening. It lets the energy out in small, equal steps.
Three parts
The escape wheel has teeth shaped like a club. Above it sits the pallet fork, which carries two small ruby stones. Next to that is the balance wheel, which swings back and forth on a hairspring.
Each time the balance swings through its centre, it knocks the fork. The fork rocks and one ruby lets a tooth go. As the tooth slides across the ruby's slanted face it pushes the fork, and the fork gives the balance a small push back. Then the wheel jumps forward and the other ruby catches a tooth. That catch is the tick you hear.
The balance is the clock. Everything else in the watch is there to keep it swinging.
Why it matters when you buy
Frequency tells you how many times a second this happens. A 3 Hz movement ticks six times a second, a 4 Hz movement eight times. Higher frequencies resist shocks a little better; lower ones often run longer on a wind. Neither is better in itself.
When we inspect a pre-owned watch, the numbers we care about most are amplitude (how far the balance swings) and beat error (whether the ticks are evenly spaced). Both are on our timing sheet for every watch we sell.