There are a number of ways, email verification before posting works well, Q&A keeps bots down, and a cheap easy is a check box that says c heck here if you are not a spammer.....the bots wont check any boxes....
We used to moderate new users, we would have to approve them, look at their profiles, if not filled out correctly, they didn't get approved. Now we just catch them when the spam and ban them, their IP's, and email addresses.