SpamAssassin is a locally-run spam filter that processes, scores, and can act (tag, move to another mailbox, delete) on incoming mail.
Spamhaus is a remote, cloud run RBL (real-time blacklist) that you can integrate in your mail delivery chain (SMTP server). Spamhaus requires a free API key to use it, so you must sign up for an account from them.
I use both in my servers since each serves an important part of the anti-UCE battle. (On another dedicated mail server, I employ ASSP -- Anti-Spam SMTP Proxy and it blocks 75% of incoming non-local mail; highly effective!)