What it does
A mechanical watch is, at heart, a counter. The mainspring stores energy, the escapement doles it out in tiny pulses, and the balance wheel converts those pulses into a regular oscillation. Each full back-and-forth swing of the balance is one beat; the gear train counts beats and turns them into hours, minutes, and seconds. If the balance swings at exactly the same rate every time, the watch keeps perfect time. Real-world balances are not perfect, which is why mechanicals run within a few seconds per day rather than the millisecond accuracy of quartz.
How it works
The balance wheel is paired with the hairspring, a tiny coiled spring fixed at one end to a stud on the cock and at the other to the balance staff. When the escapement nudges the balance, the hairspring resists, slows the wheel, then snaps it back the other way. The balance is a harmonic oscillator: like a pendulum, it has a natural period set by its mass, its diameter (moment of inertia), and the stiffness of its hairspring. Adjust any of those and you adjust the rate.
Frequency: 18,000 to 36,000 vph
Watchmakers describe the balance by its vibrations per hour (vph); one vibration equals half a swing. Vintage watches typically ran at 18,000 vph (2.5 Hz): a slow, audible, "ticky-tocky" beat. Post-1960s the industry shifted to 21,600 vph (3 Hz), then 28,800 vph (4 Hz), which is now the de-facto standard for everything from a Seiko 6R35 to a Patek 240. Hi-beat watches run at 36,000 vph (5 Hz), pioneered by Zenith's El Primero in 1969 and adopted by Grand Seiko. Higher frequency means less rate variation per swing but more wear on pivots.
Why it can go wrong
Three things upset a balance: shock, magnetism, and temperature. Shock can knock the balance staff off its pivots; modern watches use Incabloc-style shock-absorbing jewels to absorb the impact. Magnetism distorts a steel hairspring, making the watch run dramatically fast (sometimes minutes a day); silicon and Nivachron hairsprings sidestep this. Temperature changes the elasticity of the hairspring, which is why older steel-spring watches drifted in summer and slowed in winter. Charles-Édouard Guillaume's 1896 invention of Invar (and later Glucydur balance wheels) solved most of the temperature problem.
Modern variations
A modern balance wheel is usually Glucydur (a beryllium-copper alloy, anti-magnetic and stable), free-sprung (no regulator pin; rate is changed by adjusting weights on the rim), and runs in a balance assembly with a silicon or alloy hairspring. Rolex's Microstella balance is the textbook industrial version. Patek's Gyromax has eight rim weights for fine regulation. AP, Omega, and Breguet all build their own free-sprung balances. The pieces look subtle from outside, but the geometry of the balance is where every chronometer-grade watch wins or loses its battle with accuracy.
How it relates to the rest
The balance is the visible "lung" of a watch: in a display caseback you see it swinging back and forth, and that is the heart of the timekeeping. Pair it with a healthy power reserve, a clean escapement, and a stable hairspring, and you have a watch capable of holding to COSC spec. Lose any of the three and the watch will drift no matter how good the dial looks.