I see some characters with pets. How do I get one?
There are two different types of pets: class pets and companion pets. The former you only get if you're a certain class: warlocks get demonic minions, hunters can train animals to be pets, death knights can get undead pets, and frost mages can get a water elemental as a pet.
But I have a feeling you're talking about so-called companion pets. Companion pets are rewards for all sorts of things: achievements, quests, out-of-game events; some are even available for purchase with real money.
The best way to find out how to get one is to figure out the companion you'd like to have first, and find out what you need to do to get it. To that end, the website WarcraftPets.com has a searchable database that gives all the details about the different companion pets.