The term derives from "trolling", a style of fishing which involves trailing bait through a likely spot hoping for a bite. The troll posts a message, often in response to an honest question, that is intended to upset, disrupt or simply insult the group.
Usually, it will fail, as the troll rarely bothers to match the tone or style of the group, and usually its ignorance shows.
Why do trolls do it?
I believe that most trolls are sad people, living their lonely lives vicariously through those they see as strong and successful.
Disrupting a stable newsgroup gives the illusion of power, just as for a few, stalking a strong person allows them to think they are strong, too.
For trolls, any response is 'recognition'; they are unable to distinguish between irritation and admiration; their ego grows directly in proportion to the response, regardless of the form or content of that response.
Trolls, rather surprisingly, dispute this, claiming that it's a game or joke; this merely confirms the diagnosis; how sad do you have to be to find such mind-numbingly trivial time wasting to be funny?
Remember that trolls are cowards; they'll usually post just enough to get an argument going, then sit back and count the responses (Yes, that's what they do!).