They ask people how they voted when they come out the door of the polling places, then measure the results against how that particular precinct did last time.
It's supposed to work because the samples are quite large compared to phone polls. I have now idea how they calculate for absentee voters, which has gotten to be as much as 30% of the electorate in some areas and heavily GOP. And, if you recall, in 2004, the exit polls were worthless. The pressure is on the networks to be "the first to call" which may lead to some serious gambling based on misperceptions. Rove has warned not to put too much weight on exit polls This Year.
And they've found that who they send out to collect the data makes a HUGE difference in the results - both in who actually gets selected to be polled, and how they respond. For example, when they send out female college coeds, there is an oversampling of young males, who seem to vote Democratic far more than their counterparts in precincts where exit pollers are older.