CAPTCHAs are currently the best practical remedy for spammers on Web sites. The idea is to find a problem that just about any human can solve within a few seconds, but that most computer programs are unable to solve in any amount of time. Recognizing words in a CAPTCHA is hard for computers but relatively easy for people.
Some CAPTCHAs are actually helping to digitize the world's literature. For details, see
What is reCAPTCHA?
Every time you solve a reCAPTCHA on a Web site, it helps resolve ambiguous results from an OCR program somewhere, assisting with digitization of text. And you can use this for free on your own Web site if you're getting a lot of spam.