Trolling is the act of posting mean, vicious, cruel, and inflammatory commentary online with the intent of hurting, upsetting, or angering a person or people. (Dealing with it as an honest person is a total pain in the ass.) A person who does this is called a troll. (See Urban Dictionary for more.)
Here's the brief history I've lifted from Wikipedia, because searching for examples on my own is depressing (it's cheating, I know, but trolls are depressing):
Trolling can be as simple as mean anonymous comments, or as complicated as creating a fake identity. An example would be Lori Drew, a Missouri woman who created a fake MySpace profile to lure her young neighbor, 13-year-old Megan Meier, into a (fake) Internet relationship. Drew intended to "get back" at Meier, who was no longer friends with Drew's daughter. When Drew's fake identity, as a teenage boy, dumped Meier, she committed suicide.
The contemporary use of the term is alleged to have first appeared on the Internet in the late 1980s, but the earliest known example is from 1992. It is thought to be a truncation of the phrase trolling for suckers. That phrase is itself derived from the fishing technique of slowly dragging a lure or baited hook from a moving boat, waiting for fish to strike, a technique known as trolling. The word also evokes the trolls portrayed in Scandinavian folklore and children's tales, as they are often creatures bent on mischief and wickedness. The verb "troll" originates from Old French "troller", a hunting term. The noun "troll", however, comes from the Old Norse word for a mythological monster.
The most likely derivation of the word troll can be found in the phrase "trolling for newbies", popularized in the early 1990s in the Usenet group, alt.folklore.urban (AFU). Commonly, what is meant is a relatively gentle inside joke by veteran users, presenting questions or topics that had been so overdone that only a new user would respond to them earnestly. For example, a veteran of the group might make a post on the common misconception that glass flows over time. Long-time readers would both recognize the poster's name and know that the topic had been done to death already, but new subscribers to the group would not realize, and would thus respond. These types of trolls served as a shibboleth to identify group insiders. This definition of trolling, considerably narrower than the modern understanding of the term, was considered a positive contribution. One of the most notorious AFU trollers, Snopes, went on to create his eponymous urban folklore website.
By the late 1990s, alt.folklore.urban had such heavy traffic and participation that trolling of this sort was frowned upon. Others expanded the term to include the practice of playing a seriously misinformed or deluded user, even in newsgroups where one was not a regular; these were often attempts at humor rather than provocation. In such contexts, the noun troll usually referred to an act of trolling, rather than to the author.
Before you ask, it's not illegal to create a fake profile. There's no law against failing to provide personal information about yourself or providing erroneous information.
Another example of trolling is web group Anonymous. The focus of the board is communicating anonymously which leads to a melée of expression. The upside is that the group has the freedom to do really awesome things, too, like protesting the Church of Scientogy (not a group you want to be identified by). You can read more about that here. There are many Internet-based groups with similar objectives. My recommendation for Old People is to steer clear.
Sometimes an Internet-based prank is considered trolling. Here are two less inflammatory examples from web comic xkcd:
Trolling, Urban Dictionary
Bullying in School: What Can Be Done About It?, TIME
Serious Business: Anonymous Takes On Scientology (and Doesn't Afraid of Anything), City Paper
United States v. Lori Drew, Wikipedia
Lori Drew Not Guilty of Felonies in Landmark Cyberbullying Trial, Wired
Anonymous (group), Wikipedia
Parental Trolling, xkcd