Trolling is an action used by trolls. Typically, trolling involves the use of derogatory language (ie. faggot, gay retard, etc.) in an attempt to make the receiving party feel worse, or provoke them into attacking.
According to the Troll King, trolling was initially referred to as "being a dick" and began from humans. Humans during the Middle Ages made fun of the Troll King because he wasn't human, leading to the King hiding under a bridge and making fun of various other humans. Presumably, it was during this time period where the act of being a dick began to take on its new name as "trolling".
Being trolled typically leads to the victim crying uncontrollably or feeling depressed/annoyed, as seen with Tails in the beginning of Chapter 1: tails gets trolled, and Silver towards the end of Chapter 1. In some cases, it leads to extreme acts of violence as a result of the victim wanting to take revenge against the troll.
There is no definitive counter to being trolled. Groups such as the Troll Slaiyers have various members that have their own methods of fighting against being trolled (such as acting gay or having no ears to hear trolls with) but it is not known if there is a way to stop trolling for good. However, violence and murdering said trolls are often used a methods of defeating trolls.