When you press the brake pedal, a piston in the master cylinder uses the force of the brake fluid to push the brake pads against the brake rotors or drums, creating friction and slowing down the vehicle. This process occurs regardless of whether the engine is running or not, as long as there is sufficient brake fluid in the system.
It is important to note that certain advanced driver assistance systems (ADAS) that rely on the engine or electrical power may be disabled when the engine stalls. However, the primary mechanical braking function will continue to operate, ensuring that you can still stop the vehicle safely.
Always be aware of your surroundings and be prepared for potential engine stalls, especially when driving a manual transmission vehicle. If the engine stalls while driving, maintain a calm demeanor and smoothly transition to using the brakes to slow down and come to a stop. If the engine stalls in a dangerous or unpredictable situation, you may need to use the parking brake to maintain control of the vehicle until you can bring it to a safe stop.