Why does locking the rear tires on a vehicle cause it to spin? Handbrake Turns are often used in motor-sports and stunt driving to turn around tight corners.  Essentially, the driver applies the handbrake as he enters the turn, in order to "kick out" the back end and slide the vehicle around the corner.
However, applying the handbrake hard enough to lock the rear wheels while traveling straight will cause the rear of the vehicle to "kick out".  Given enough speed, the vehicle will spin 180 degrees.
Why do sliding wheels on a car want to "get in front" of rolling wheels?
 A: They don't want to get in front of the rolling wheels -- at least, not intrinsically.
When you are turning, your front wheels stop going forwards so much, and start going sideways. As Newton taught us, a great way to think about such things is that an object in motion will tend to keep moving however it is moving. There are sideways forces on the front wheels created by the friction of the wheels with the ground, slowing down its forward speed, and transferring that into sideways speed. So that's how "objects keep moving" works out for the front side of your car: forces act on it to stop its forward motion and create sideways motion. Now let's examine how this principle works for the backside of your car.
Normally, there is an "easy direction" for the back of your car to move -- in the direction of the wheels -- and a "hard direction" to move -- perpendicular to that direction. This creates side-forces which keep your rear wheels "following" your front wheels. They have a less-steep turn than the front wheels but also they start acting a few meters before the front wheels do, so they tend to take turns tighter, which is why it's harder, e.g., to forwards-perpendicular-park on your right rather than your left (if you've just been succeeding unconsciously or always back-in: when you forwards-perpendicular-park to the right, you usually have to swerve left pre-emptively to give your rear wheels room to take the turn, because taking that turn tighter than the front wheels would otherwise mean hitting the car occupying the spot 1 before the one you want to park in).
When you pull the handbrake, or your rear wheels hit ice, hydroplane, or go airborne, you set these two directions on equal footing: your rear wheels then are not so well "guided" by these side forces, and mostly just want to keep going forward, with a slight pull induced by the front tires. Even worse, as @BillN notes, they now have a lower coefficient of friction than those stabilizing forces did, so slowing them down to rest becomes harder.
In the worst case, the front wheels stop their forward motion entirely while the rear wheels are still sliding. The ensuing driver panic usually means that they stop doing whatever they were doing, and brake: the rear wheels will then pull the car entirely around until the front wheels stop the slide. This is, you guessed it, why it turns 180 degrees and not some other number like 270 or such.[1]
In the case of a handbrake turn, the front wheels follow a curve that is so tight that would cause the back wheels, since they take the turn tighter, to hit the curb or worse. Allowing the rear wheels to slide in the forward direction of motion means that they instead "kick out" (keep going in a straight line rather than following the curve of the front wheels), effectively pivoting the car about its front wheels. So the mechanism is not special: it is just that things which have forward momentum need forces to guide them off of it, and the strong forces which keep the backside of the car guided towards the front have been exchanged for weaker forces which slow down the backside of the car without having a preferred direction.


*

*Yes, this happens on snow or when the rear wheels are underinflated and hydroplane. As an anecdote: When I was practicing for my driver's license we did some snow driving, because my Dad wanted me to be prepared for anything. I actually saw someone start fishtailing on slushy snow and slowed way the hell down myself, and the event indeed ended with traffic stopped and the poor dude was faced backwards, and we were looking face-to-face. He was ghost-white and I was pretty awestruck by the dangers of driving.

A: First, braking causes the car to pitch forward on its suspension and decrease the static friction available on the rear tires and increase that on the front. The rear tires begin to slide because the available friction is less than the friction to prevent sliding. This means they are now in the realm of kinetic friction.
The kinetic friction on the rear tires will be less than the static friction on the front tires (they are still rolling and not sliding, presumably).  A small deviation in the steering direction, from the driver or a loose steering box, introduces a torque on the car which will set the rear tires sliding sideways (less friction on them) while the front tires are not. The front of the car tends to remain ``anchored'' along the path while the rear can now rotate around the front because of the angular momentum acquired.
