Exit polls: How accurate are they?

The exit poll will give us the first clear indication of the election result - but how does it work, and are they accurate?

Source