Anonymous started in 4chan's /b/ board. The 'b' stands for 'random'. At various points in its history /b/ allowed only anonymous posting, hence the name. /b/ has always been full of trolls, and they spend their time making swastikas in Habbo Hotel, making cam whores cry by asking them about their parents and posting flashing animated GIFs on epilepsy support forums.
The activist side of Anonymous was always lurking below the surface, not all their acts were simply malicious trolling. They racked up thousands of dollars worth of bills for neo-nazi webcaster Hal Turner, tracked down and turned in some kids who tortured a cat and put the video on YouTube, several pedophiles and a guy who threatened to blow up a stadium.
They also create a mountain of memes. Most if not all of the ones you've likely heard of originated there, in fact. Examples include caturday, motivational posters, shitting bricks and FGSFDS.
The first real campaign was a few years ago, when some people decided the Church of Scientology was an enemy. They organised in Project Chanology, which launched DDOS attacks on CoS websites and protested in a bunch of cities around the world. They didn't achieve much, but the media exposure did make the practices of CoS more widely known. This is also when the Guy Fawkes masks started appearing in the mainstream.
They apparently liked the feeling and have since campaigned against various other organisations: Visa and Mastercard for blocking donations to WikiLeaks, Sony for its actions against GeoHot, various governments in the Middle East during the Arab Spring and the Australian government for proposing internet filtering legislation. There have also been various statements of support for the Occupy movement.
The trolling also still happens, though. Anonymous is not a unified organization, far from it, and there is frequent infighting, though it's usually limited to a disagreement over what to do (if anything at all), not over which side of an issue to support. Anyone can claim to be a part of Anonymous, since there is no formal leadership, nor a well defined member base.
We can look at previous actions of the activist part of Anonymous and come to the conclusion that for the most part they've been in favour of a free and open Internet, as well as freedom of information in general, and against corporatism and repression. Personally, I agree with most of their opinions, but dislike most of their tactics, because I don't believe in "the end justifies the means". I also have some trouble aligning myself with a group that is equal parts "induldge every whim" and "make the world a better place".
For more information,
this is probably a good place to start. Encyclopedia Dramatica (NSFW) as a whole can give you more in-depth information, as well as an impression of what the community is like. Beware, though: ED is as much a swamp of bullshit as it is a goldmine. Don't let the prospect of filthy pants dissuade you.