First, it's important to remember that trolls are not attacking you—they're attacking boredom. They have nothing better to do than say something mean so that's how they've unfortunately chosen to spend their time. If what they're saying isn't going to have much of an impact on anyone, just remember that they're bored, loathsome people and let it go. On the other hand, if they're promoting hate speech and potentially causing harm to others, it's best to avoid engaging them and instead report them to the site's administrator. Many sites offer a means of flagging harmful posts, and commenting systems offer ways for an administrator to ban problematic users. A simple email is often sufficient to take care of a bad person. Engaging with a troll-ish thread is just going to make you angry and potentially get you in trouble, too. If you do fall into the trap of feeding a troll, however, using the principles of cognitive therapy can be a worthy solution. This means responding positively and calmly, while accepting their different opinion. The trolls will likely find it frustrating and even condescending, but it's hard to argue with someone who is accepting your point of view (or even agreeing with you).
Link -via Geeks Are Sexy