This used to be a good guide with an animated gif showing how the internal cyllinders work in the brake pump -- but it looks like they've changed it a bit in the couple of years since I've looked at it. I too had this question a few years ago:
http://auto.howstuffworks.com/anti-lock-brake.htm
It's "sorta" how it works. Instead of a speed sensor, some cars used to use a "slip" sensor that was a combination of a shaft encoder and accelerometer. Since then it's been proven to be easier and faster to use speed differentials to control the brake fluid pressure.