As pompa says they use an accelerometer to count the number of steps, so it's worth bearing in mind that even if the step count is accurate, the distance measurement will only be as good as your ability to maintain the accuracy of your stride length. I had a mechanical pedometer donkeys years ago, and it was hopeless.
Which have just tested them last month, with mixed results. Accuracy depends on what it is you want to measure, as well as which one you buy. They were best at counting steps whilst walking and running, with an average accuracy of within 3%, but the accuracy measuring calories burnt was out by 65% walking, and 19% running, on average. Accuracy of the step counter was much poorer during daily routines, at 12%. Note that they are averages, some brands will be worse.
The Fitbit Zip was the best, and the cheapest at £35, but it's not a wristband. Runner up was the Sony Smartband SWR10 for twice the price. The Epson Pulsense PS-100 was the worst, and second most expensive.