Stealth
The Pick Pocket ability is learned at level 4, but it won't do you any good until you learn the Stealth ability at level 5. You must be using the Stealth ability to pick a pocket. Stealth allows you to turn nearly invisible to monsters around you. Though they can still see you if you get close enough, Stealth allows you to get close enough to a monster's pocket to put your fingers in and pull out whatever is there.
Range
As you might expect, your arm can't reach a very long distance. As a result, you must get close enough to a monster to pick its pocket. This is one reason why the Stealth ability is so helpful, since it allows you to get very close without the monster seeing you. You must be within 5 yards of the monster to be able to reach into its pockets. But take care that you don't get too close.
Position
Though there are no positioning rules for pickpocketing, there are some recommendations for being a more effective and successful thief. You can theoretically run up right into the face of a monster and pick his pocket in time before he sees you, but this isn't recommended, since a monster is much more likely to see through your Stealth ability and attack you before you can pick the pocket. It's better to sneak up from behind. Keep in mind also that you will sometimes fail at picking a pocket, and the monster will immediately attack you.
Monster Types
It might sound strange to think that a monster has pockets, especially if its a big hairy werewolf or a skeleton. But as long as the monster is classified as a "humanoid," which you can see in the description when you hover your mouse over the monster, it will have a pocket for you to pick. There are some other monster types that have pockets, but "beasts" almost always will not. You also cannot pick the pockets of other World of Warcraft players.