Just as in a magic show, the major method at work here is distraction. Human beings usually focus their attention on one thing, so if you give them anything interesting to focus on, they won't pay attention to their money and valuables.
In the pickpocketing world, distraction can get pretty elaborate. Two members of a team might stage a fight while the third member takes advantage of the inattentive crowd. Child pickpockets may try to show something to a mark, like a drawing or a toy, while other children sneak up from behind. Another common trick is to surreptitiously spray someone with bird droppings, or a convincing facsimile, and then offer to help clean it off.
Some pickpockets play on compassion in their distractions. They "accidentally" drop change or shopping bags on the ground so that someone will stop to help them. While the mark is kneeling on the ground with the first pickpocket, another member of the team steals his or her wallet. At the beach, one member of the team may pretend to be in trouble in the water. When the mark runs in to help out, another member of the team walks off with whatever the mark has left on the beach.
Sometimes, pickpockets don't want to distract you from your money; they want to bring your attention to it. For example, one member of a pickpocket team might yell out "Somebody just stole my wallet!" in a crowded subway station. Most people's automatic reaction is to make sure they still have their own wallet and valuables, so they'll pat whatever pocket it's in. This makes the pickpockets' job a lot easier -- it shows them exactly where to look. Pickpockets will also stake out ATMs or cash registers and watch where people put their money. Pickpockets will also "fan" victims -- casually brush by to feel where the mark's wallet is before trying to steal it.
Pickpockets are always coming up with new schemes, so it's nearly impossible to make yourself completely immune to their tricks. But you can make their work a lot harder, as we'll see in the next section.