Applications such as weblogging tools and wikis enable you to build a relationship with your users by allowing them to contribute to your site, either by posting comments or contributing information of their own. Unfortunately, spammers looking to advertise their websites or raise their search engine rank also take advantage of these features by way of programs that seek out and automatically post to sites running common software, such as TypePad, WordPress, and MediaWiki (among others).
There are a number of approaches to combating spam. These days, most popular applications provide tools that attempt to prevent spammers from posting, but even so, some spam still makes it through. I mention this only to let you know that it's a risk of deploying these kinds of applications on the Web these days.
The most important thing to remember is that you shouldn't deploy one of these applications and then abandon it. A MediaWiki installation that goes unused will be overrun with spammers in no time. The same is true for the comments sections of weblogs as well. If you put up an application but then stop using it, you should remove the files or configure your web server so that it is no longer publicly accessible. Not only will it keep spammers from filling up your databases with junk, but it will be an act of good citizenship on the Web.