A gadfly screws with other people because it's amusing. Others do it because they need their pawn to do something. Then there is the infamous Troll. What separates this character from a gadfly is that what they do is not supposed to be funny. It's just cruel. What separates a Manipulative Bastard from a Troll is that there is no real point to their manipulations beyond hurting the victim. All they want to do is see someone suffer or make a fool of themselves. This has recently been the subject of a notableCritical Research Failure taken Up to Eleven by British Newspapers as of mid-2012; the term "Internet trolling" they refer to is in factcyber-abusers, which is far worse than trolling. In any case, a troll is someone who would probably say "I like New York Yankees. X [team on fan site] suck!" in a baseball forum, whereas a cyber-abuser is not a troll and does it for more harmful reasons, which toy with emotions sometimes.
The term trolling comes from fishing (i.e. trawling), of all things. The idea is that you set out some bait and watch as your victim grabs it and writhes for your amusement. Malcontents on the internet protected by anonymity have been doing this for years, hence the widespread usage of the term. When encountered in a game, a troll is often called a Griefer. While the word and concept are based on these beginnings, the term has spread from there such that it has become a widely used term to discuss pointlessly cruel characters.
If they just want to see their victims flail, then they're a true Troll.
See also For the Evulz. Compare and contrast The Gadfly, who is relatively harmless, but can be easily mistaken for a troll on the internet. Contrast with Manipulative Bastard as such a character has an ultimate goal more than simply making someone suffer for its own sake. A female troll is known as a trollette or a troll bitch. Supernatural versions of this trope can also be a Jack Ass Genie.
For an article about mythological trolls, see All Trolls Are Different.
The film of the same name is over here.
Sayonara, Zetsubou-Sensei has Meru Otonashi, who (true to her name) is extremely shy around others, and only communicates through text messages... pretty much all of which consist entirely of outrageous slander of the recipient. And don't even think about taking her phone away, because she has extras. And don't bother waiting for the battery to die. She has extras. Many extras.
Durarara!!'s Izaya Orihara not only trolls the internet (his favorite tactic appears to be posing as a girl in chatrooms) but also real life on a near-constant basis.
Fullmetal Alchemist: Upon his release, SolfJ.Kimblee pranked a Mook by transmuting his watch into a time bomb...that turned out to actually be a cuckoo clock toy.
Film
In Jay And Silent Bob Strike Back, the plot is kicked off by the duo's reaction to trolls on a movie review site. The movie also ends with them flying to each troll's house and beating the ever loving hell out of them.
Joker: Make me. It doesn't matter. I win. I made you lose control. And they'll kill you for it.
Literature
In Ender's Game, Peter and Valentine troll message boards in order to learn from the angry responses. Step 1: Troll message boards. Step 2: ??? Step 3: World domination!
Pretty much the entirety of Edgar Allan Poe's only full-length novel, The Narrative of Arthur Gordon Pym of Nantucket, is a long, mean-spirited practical joke at the expense of readers. In an age where exploration narratives were one of the most popular forms of literature, he published it without a label indicating it as fiction, made it completely unbelievable, and turned most of the plot into a series of anticlimactic moments, and the ending is infamously abrupt. First editions tend to have marginalia along the lines of "I don't believe a word of this!" and "Damned liar!"
Wedge Antilles, in the X-Wing Series, loves to give straight-faced lies to his friends and peers. (Suboordinates are mostly exempt.) Han Solo tends to fall for them, Leia generally sees right through him - "You're such a liar", she says once - and even Luke was fooled at least once - the Marvel Star Wars story in which Wes Janson dies has been worked around into a story Wedge tells. Wes himself similarly enjoys trolling Wedge, who plays straight man for him unless a line is crossed, as in Solo Command, which led to a truly amazing reversal.
Kaitou from Kamen Rider Decade is a mild example in that he only purposely trolls one particular person, but everytime he's onscreen with Tsukasa, he takes the opportunity to mess with him and try to ruin his plans, complete with a grin on his face. As the show continues, he eventually becomes a bit more friendly, but then in the finale, after tearful confessions of camaraderie, he beautifully comes full circle when he unexpectedly shoots Tsukasa in the face for a season-ending cliffhanger.
Best examplified by his cameo in the Kamen Rider Den-O movie The Onigashima Battleship (where he trolls someone else for once), which is nothing more than teleporting in, siccing copies of past Riders on the DenLiner crew, and teleporting out.
Thanks to Villain Decay, Narutaki ended up as this: after the first few episodes, he did very little other than taunt Decade every time something went wrong.
The Top Gear America Used Car Challenge special essentially required them to troll Alabama by writing slogans on each other's cars.
Rajesh Koothrappali from The Big Bang Theory is not above mocking even his own friends when the opportunity for it comes.
None of them are above that, really.
Sherlock Holmes on Elementary frequents a conspiracy theorist BBS as a hobby. The joke, of course, is that the hobby is studying the other forumgoers, up to and including making up conspiracies out of whole cloth.
Joe Carroll manages to escape from prison, and take control of his cult. He occasionally calls Hardy on the phone, just to give him a Hannibal Lecture. It backfires in episode 12. Carroll calls Hardy, who reveals they found the cult's armory/training ground. Carroll and the other cultists quickly realize this means their screwed.
In episode 13, Hardy manages to troll Carroll mocking him over the fact that Roderick has been arrested, and that Roderick kidnapped Joey. When Carroll tries to give a Hannibal Lecture, Hardy just hangs up on him. Carroll who does not take any of this well.
Mythology and Religion
The Nigerian trickster god Edshu: In one story, he walks down the road wearing a hat that is red on one side and blue on the other. When people on one side of the road ask "Who's that going by in the red hat?", they get into fights with people on the other side who insist that the hat was blue. The god takes credit for this, saying "Spreading strife is my greatest joy."
Software
Akita Neru is a Vocaloid character created during a troll attack in the Japanese 2ch message board accusing the characters of being pointless moeblobs, and calling everybody who used the program a misogynistic freak who wanted the illusion of controlling women. She is now considered an Anthropomorphic Personification of trolls.
Tabletop Games
Warhammer 40 K: the Chaos god Tzeentch can be considered this, given that he's the embodiment of god of scheming, magic and backstabbing. One example is a traitor governor asking a daemon for something that would break the Dark Angels' siege on his fortress. The daemon complies, giving him a teleport homer that allows Dark Angel Terminators to deep strike around him, quickly ending the siege.
In fanon, Eldrad Ulthuan and Ursukar Creed are considered as such. Eldrad is a powerful Eldar warlock who uses his gift of prophecy to do things like manipulate events so a Banshee's Breast Plate falls off and generally be a dick. Creed is an Imperial general with a special rule that allows a unit to be hidden anywhere◊, which was quickly taken to include Baneblades and Titans.
this is usually followed by someone yelling or raging out a single word: CREEEEEED!
Video Games
In The Sims 3, Sims with certain traits, evil most notably, can troll forums, and derive fun from doing so.
Hazama / Terumi from BlazBlue practically revels in trolling and taunting everyone he comes across, as shown heavily on Ragna and Rachel. By Continuum Shift, he has practically trolled the entire cast because no matter what you do, even if you Astral Finish him, he always wins. He's even been named the god of trolling!
Forum Warz is an RPG where you play a troll - an Emo Kid, a Camwhore, a Hacker or a Perma-Noob. People contact you to bring down forums by "fighting" forum threads, derailing them and posting nonsense until you "pwn" the entire forum.
Borderlands 2 gives us Handsome Jack. He's a petty bastard who enjoys calling up the Vault Hunters to fire insults at them. Sometimes it's just childish, sometimes it's brutally twisting the knife after a Player Punch, and sometimes it's to point out that the player is really doing terribly, but it's never for any point beyond aggrandizing himself and angering the Vault Hunters.
He's often referred as a western equivalent of Terumi above for a good reason.
Mass Effect 3: Javik has been described by players as the galaxy's oldest and greatest troll. Most of his dialogue consists of him claiming various ways the protheans were more advanced than the galaxy's current "primitives", and he also loves letting someone else run their mouth and then completely shutting them down in a single statement.
He's also been known to wind up his teammates with an outrageous lie about how things were in his cycle, knowing they'll never be able to tell between him making something up and a genuine Prothean tradition. For instance, when observing a poker game in progress, he casually mentions a game the Protheans "used to play" involving a sort of sacrificial combat arena... which he made up out of whole cloth, since his real hobby these days is mocking primitives.
EDI is also far too fond of jokes about robotic overlords and mechanical failures for some of the crew's taste.
The Golden Spider/Chakravartin from Asuras Wrath acts this way to prod Asura enough for him to escape Naraka.
Visual Novels
In arcs where she is the one who goes insane (especially Meakashi-hen), Shion Sonozaki from Higurashi No Naku Koro Ni becomes a truly horrifying troll, taking sadistic pleasure in the havoc she wrecks through phone calls and misdirection. Normally she's a gad fly.
We also have Takano, who actively provokes the Hate Plague in at least 4 of the first 6 novels.
Barring Gretel, the witches of Umineko No Naku Koro Ni are all trolls of varying degrees of maliciousness, ranging from the capricious and amoral Lambadelta, all the way to full blown monster, as is the case with Bernkastel. The copius amounts of trolls gave the series the Fan Nick Name "Trolls trolling trolls trolling trolls."
The twelve trolls in Homestuck are actually major characters. They start off as simple internet trolls, but later befriend the four protagonists and act as exposition. And they are literal trolls, i.e. aliens from a different planet.
For Dolan, a badly drawn, Ax Crazy, rapist knock off of Donald Duck, cruel emotional torment (for his own entertainment) of the other toons is the least of his terrible acts. All of this played for Black Comedy. One of his more infamous incidents involves giving Gooby a car as a gift, only to reveal that it was a stolen vehicle, resulting in Gooby being framed for grand theft auto.
Web Original
Retsupurae tried to riff on a usual LP, but about six minutes and thirty seconds in "The Marios", they discover it was intentionally made to be Retsupurae'd and it actually derails their commentary.
Parodied in a College Humor sketch featuring an Internet troll living under a bridge. He blocks the road and shouts racist, sexist, homophobic or just plain inflammatory comments at people until they lose their temper, at which point they get sent flying Monty Python style. The only way to defeat them is to agree with everything they say until you can get them to unironically and genuinely admit vulnerability and the need for friendship, which imposes the same fate on them as their victims.
Parodied in episode 48 of Yu-Gi-Oh! The Abridged Series, where Internet trolls abduct Téa and prepare to cook her to death with their flames ("ONE STAR! DOWN THUMB!").
Referred to in the introduction to David Hume's Enquiry Concerning the Principles of Morals, in which he calls people who are "entirely disingenuous, and really do not believe the opinions they defend, but engage in the controversy from affectation, from a spirit of opposition, or from a desire of showing wit and ingenuity superior to the rest of mankind" the most irksome of all types of people. Hume goes on to state that "the only way, therefore, of converting an antagonist of this kind, is to leave him to himself. For, finding that no body keeps up the controversy with him, it is probable he will, at last, of himself, from mere weariness, come over to the side of common sense and reason."