How do forum spambots work?
Talented (if evil) programmers write them - there are probably as many different types of spambots as there are people writing them but, unfortunately, it only takes a few spambot authors sharing and selling their work to ruin life for administrators...
One popular forum spamming application is called "xrumer" - here's a video of xrumer in action (note that there is a fair amount of human intervention required to get it set up).
While I realize that this doesn't answer all of your questions, I think it bears mentioning that anything a bot can't do well (like solve complex non-static logic questions) can be done by a low-paid worker overseas. Spamming is a business much like any other and there is no shortage of cheap labor being plied toward putting spam messages out there.