1) The rear derailleur gets bumped, bending the derailleur hanger slightly in towards the rear wheel.
2) At some point the rider shifts towards the larger cogs (easier gears), at which point the derailleur cage gets caught in the spokes of the spinning wheel.
3) Terrible things happen.
The derailleur hanger is the small tab which connects the derailleur to the bike frame. On most modern bikes these are replaceable, meant to be a sacrificial part. Because they're meant to be the weakest part of that system (to avoid damage to the more expensive derailleur or frame), it takes surprisingly little force to bend them. Something as minor as tipping the bike over onto the right side can do it. Or maybe you didn't quite make it through that closing door on your way out of the bike shop, and the door bumped your derailleur. Or perhaps you were a little ungentle while loading the bike into your car. Needless to say, actually crashing the bike on that side can bend the hanger.
But the major damage often comes later, when you continue to ride a bike with a bent hanger. So be forewarned: it's much cheaper to replace a bent hanger than your derailleur and rear wheel.