For example, if your child repeatedly tries to get under the sink at a friend's not-so-child proofed home, you should stop whatever you're doing and find a safe activity like a new book or some playdough in a high chair while you get the kitchen gated off or figure out how to keep the cabinet locked.
Or, say you just got the living room cleaned and you're about to have company. Your child comes in and starts dumping buckets of toys. You can quickly give your child a task ("Will you go get your hairbrush so I can fix your pony tails?") that requires her to leave the room. You want her to stop what she's doing and get her moving in a completely different direction.
The goal here is not to replace throwing rocks (inappropriate) with throwing balls (appropriate) like with redirection. Instead, you want to take your toddler's mind and energy completely away from the inappropriate activity. Sure, you could just tell her "No" or "Stop" if you want to stop an unwanted behavior, but many times with toddlers, this just isn't enough. Instead of taking your toddler's mind off the behavior, by telling her she can't do it, you're directing her mind it even more. Telling her "No" can just lead to a battle of wills, more defiance or a tantrum.
There are certainly times when you might want to work through that tantrum or defiance so that your child learns that certain activities are always unacceptable (like biting or hurting a pet). In those cases, distraction is not the best method of discipline. But for those times when you just want a sometime behavior to stop or your don't have the time or energy to deal with a meltdown, distraction is a quick, effective way to handle the situation.
As in most parenting situations, there is no one-size-fits-all method of toddler discipline. The more discipline tools you have at your disposal the better. Parents may find that the more they rely on one single method, the less effective that method becomes. When you use distraction, pay close attention to your child's reaction. Be as consistent as possible, but remain flexible if you find that distraction isn't working any longer. You might want to try one of these other toddler discipline techniques instead.