What it does
An annual calendar mechanism knows that some months have 30 days and some have 31, so when April 30 turns to May 1, the date automatically skips correctly. The mechanism does NOT account for February's variable length (28 or 29 days), so it requires one manual correction per year: at the end of February, you advance the date manually to March 1. Otherwise, the calendar runs autonomously.
Why it exists
A full perpetual calendar requires roughly 140-180 additional movement parts and pushes retail to CHF 25,000+. An annual calendar achieves 95% of the convenience with a much simpler mechanism (~30-50 additional parts) and retails at CHF 15,000-25,000. Patek's 1996 launch established the annual calendar as the more-accessible peer to the grand-complication perpetual.
The Patek 5035 / 5396 lineage
Patek Philippe ref. 5035 (1996) was the first wristwatch annual calendar. The successor 5396 added moonphase. Both use Cal. 324 S Q (the 'Q' = quantième, the French term for date). The annual calendar mechanism was Patek's IP for years; competitor brands (Audemars Piguet, Breguet, Vacheron) eventually developed their own. Most modern annual calendars use cam-and-lever mechanisms similar in principle to perpetuals but with the leap-year cycle wheel removed.
When to choose annual vs perpetual
If you want auto-correcting calendar but don't want to spend CHF 25,000+, annual calendar is the answer. If you want the watch to know about leap years and run untouched until 2100, perpetual. For a one-watch collection that you wear daily, annual is more practical (you'll touch it once a year, on a memorable date). For a haute-horlogerie statement piece, perpetual carries the prestige.