There are already great RBL checking tools like http://www.dnsbl.info/dnsbl-database-check.php, if you're trying to find out if you're listed, but if you want more manual control, like getting the raw return value for a specific IP, in a specific RBL list, you can use "dig".
To do this, you simply do a lookup, of the IPv4 IP in reverse order, as a subdomain of the RBL list.
For example, lets say you want to check IP: ...
In the RBL list: