How does Stack Overflow track or block a user that isn't logged in and that asked or answered a question that has been flagged as spam or offensive? I'm asking because I'm also creating a Q&A site.
We have several layers of spam protection in place, in key areas of the site where anonymous participation can quickly become a source of frustration if abused.
The short answer, we don't waste an ounce of signal that we get from this sort of activity. We gather it from our users and moderators as they work to keep the site clean, and we gather it from spam networks themselves as they go about their evil deeds. I can't go into very many specifics, but the system is quite simple as far as these sorts of things go, and extremely difficult to defeat.
If you're building a Q&A site, then you first have to make sure you have enough users that care about keeping the place clean, and make sure they have the tools to do it. When a human user that you trust says "this is spam", especially more than one, don't waste that signal.
The mechanics of dealing with it once identified is an exercise to the reader ;)