When you need to stop in an emergency, you should:

If you need to make an emergency stop, you can use either the controlled braking method or the stab braking method. It's important to brake in a way that keeps your vehicle traveling in a straight line while still allowing you to turn, if necessary.
DMV Writen Test