The query
The IP, reversed, as if it were a domain
To find out whether 203.0.113.10 is on Spamhaus, the server queries 10.113.0.203.zen.spamhaus.org. If that name doesn't exist, the IP is clean. If it answers with a 127.0.0.x address, it's listed, and the last number says why.
What Spamhaus answers
zen.spamhaus.orgdoesn't exist
the IP isn't on the list
127.0.0.2
SBL: known spam source
127.0.0.4
XBL: infected computer or open proxy
127.0.0.10
PBL: range that shouldn't send directly
127.255.255.254
I won't answer you: public DNS