It's a nightmare for drivers: You put your foot on the brake and nothing happens. When your brakes fail, the thing you need to do is bring the vehicle to a stop as quickly and safely as possible.
Fortunately, it's possible to stop a car with no brakes, as long as you know what you are doing.
Here is what you need to do:
Warn Those Around You
Make sure to do something to let other drivers know that you have a problem. You can put your hazards on, or flash your high beams and honk your horn. Hazards are often easiest as you don't have to do anything further, just keep them on until (and if necessary after) you stop.
Choose a Safe Trajectory
Depending on where you are, you may or may not want to pull over. On the highway, you want to get onto the shoulder.
On a crowded street you may have to stay in the traffic lanes because of parked vehicles, but if you see a way to get out of the path of other vehicles, take it. Make sure not to aim your car onto sidewalks or places where there might be pedestrians.
Pump Your Brakes
Move your foot from the accelerator to the brake and then pump the brake pedal. Yes, even if you have anti-lock brakes. In some cases this can build up pressure in the braking system and give you enough brakes to slow down or even stop.
Shift down through your gears if driving a manual. If driving an automatic, shift out of drive and through the lower gears.
This employs engine braking (this is why you sometimes see signs on the highway before a significant down gradient reminding trucks to shift to a lower gear; with their weight the engine braking is often needed). In a real emergency you can shift down more than one gear at once, but this can break your transmission and potentially cause you to skid.
You should get your car into the lowest gear. If this doesn't stop it, move to the next step.
Use the Emergency Brake
Once you have your vehicle slowed down some, you can then engage the emergency brake. You should not do so at high speed and you must remember that it only stops your rear wheels, which can result in a skid.
If your car does skid, steer into the skid rather than against it. Apply the emergency brake slowly with the release button pressed down. This is exactly what the emergency brake is for.
If you are heading for an obstacle, you can try a bootlegger's turn. This means yanking the emergency brake while turning the wheel a quarter turn in either direction. This will spin your car so it's pointing the other way. It's useful if you're going downhill and building up speed too, but you do need to be ready for the sudden motion.
In some circumstances you might be able to use the local terrain to slow your car. This works on the same principle as emergency escape ramps on mountain highways. If you can turn your car up a hill or onto a slope, do so.
Don't hit an incline at high speed, however, or you might end up flipping your car. In an absolute last resort, you might have to deliberately crash your car into a soft object such as shrubs, bushes, or sand, or intentionally put it in a shallow ditch. Avoid solid objects, large trees and other vehicles.
Once you have your car stopped, leave your hazards on and call for help. Don't attempt to drive the vehicle again until the brakes have been checked and repaired.