to stop the spam bots:
Knowledge Base - How to configure Q&A CAPTCHA.
to stop the human spammers:
user registration settings:
set registration to "by user"
then set the "new member post limit" to 1
it is not retroactive, it will only apply to those who register after you set it.