On occasion Twitter accounts get hacked and are used to send out spam to other twitter followers, usually via Direct Message. When your twitter account is taken over there are two different things that you need to do in order to get your account back under your control.
The first is pretty straight forward, change your Twitter password. This is done by going to the Twitter web site (www.twitter.com) and logging in. Then you’ll need to go to your settings page (by clicking the little person drop down in the upper right, then selecting settings from the menu) and select the Password tab from the menu on the left. You can also get there directly from this link.
The second thing that needs to be done is to reset the rights that all the applications have to use your account. If you don’t do this, and one of the apps which has access to your account is what is sending out the direct messages, it will still be able to send out the direct messages. You do this by logging into the Twitter web site (www.twitter.com) and logging into your account, then going into your account settings (by clicking the little person drop down in the upper right, then selecting settings from the menu), then selecting “Apps” from the menu on the left. You can also get there directory from this link. From this page you’ll want to revoke access to every application listed. Then as you come across the applications naturally add them back, but don’t assume that the app that currently has the rights to your account should.
Once you’ve done both of these things you’ll need to change the password for any third party applications like Tweet Deck which logs in to the Twitter website directly, and any apps which need access to your Twitter account will need to be reauthorized. This sounds painful, but it isn’t. Check the website for your Twitter client on how to change the password which the application uses to log into the website.
Hopefully you never need this information, but if you hopefully this helps fix any problems that you have,