An emergency braking is a term used to describe the action of stopping a train due to an emergency.
Pulling the brake leaver to maximum in most steam and diesel locomotives, or releasing a pedal in most modern electric locomotives, causes an emergency stop. For the electric type, it requires the driver to keep pressure on the pedal with their foot, otherwise the brakes deploy. This is to avoid accidents when, for instance, the driver falls asleep.
Whenever the emergency brakes are applied, all air pressure travels through the emergency valve simultaneously (at the same time).