What is the mechanism that stops the train when pulling the chain?
When you look in between two coaches you will see the coaches are coupled with the coupler, and there are two black pipes below the coupler. It continues from engine to rear of the train. One of those is Feed pipe, the other is Break pipe. Why? The feed pipe is connected with the engine's MR reservoir which maintains 5kg per sq cm air pressure from engine to rear to keep the breaks of coaches in release condition. The other the break pipe which exhaust the air pressure either it is applied by the driver or a passenger pulls the alarm chain. As soon as any of the one happens...
more... break pipe pressure drops below 5kg per sq cm and break applies. If it is done by the driver instantly he will create 5kg pressure in feed pipe and feed pipe will feed the break pipe as much air pressure exhausted by the driver, and break will release, train will move freely. You must have experienced that during your journey, sometimes it is slow, and again normal speed.
Now, when someone pulls the alarm chain what happens. At the end of every coaches on top you will see a mechanism. Actually that is a valve, known as Clappet Valve. It is connected with the brake pipe. When someone pulls the chain this velvet opens and air pressure exhausts from break pipe. Since it is done from a coach, driver of the train can not maintain break pipe pressure required 5kg per sq cm from engine. So how to set. When the chain is pulled, Clappet Valve opens air pressure releases through the valve with a big hissssing sound. Until the valve is closed the break pipe pressure will not built up to the required and train will not move. Look at the valve, you will see a steel wire is hanging with a wooden handle. Staff of the train will come , will pull the steel wire and the valve will be closed. Hissing sound will stop. Within minutes feed pipe, and break pipe will maintain required air pressure, Breaks will be released and enjoy your onward journey.
.