They make a test request from the client and check it's received on the server end and returns what they expect on the client end at a guess. Basically they try to load an ad and if they don't see the request on the server, or the client doesn't get the sort of data it expects, it assumes you're ad blocking.
The client side code probably expects to see and use the data, although I could be wrong on that. Some ad block do work like that though, I think.I find just deliberately taking a 30 second break to be the easiest ad block, and it's better for you too.