How do you steal peoples Pokemon in Pokemon Pearl?

If you have a master ball you can steal another trainers pokemon in battle.