"in the days before mobile phones" it was apparently the thing that emergency messages were written on paper, tied around something heavy and thrown out where a signalman would see it being done. This implies that the signal box had a telephone and could relay the message to where it was needed.
I imagine it was for things like "Put this train in a platform at ... station and get an ambulance to attend!" I can't remember if it was just in some fiction that I have read, on an old film or if it was in somebody's memoirs...
All sorts of things could be done if the situation warranted and the circumstances made it possible, but that wasn’t always the case. The old chestnut of a message pushed into a sliced potato or round a piece of coal from the restaurant car stove thrown out at a signal box no doubt did happen, but such things required good aim, the signalman to be looking in the right direction and it being daylight (and spuds on the menu). Showing ‘signs of alarm’ risks the signalman throwing the signals back causing an emergency stop, which may be an overreaction.
One possibility that I have had was the guard partially applying the brake before releasing it several times and hoping that the driver got the message. He did and stopped at my box, the guard told me what was up and I passed the message on that the train must make a special stop at Exeter (it was a Summer Saturday ‘runner’), where an ambulance was waiting. I have also had a guard bellowing ‘Taunton platform’ as a train passed for a train that should have run through the station.
One problem in more recent, but pre mobile ‘phone, days was long stretches without a station or signal box. There would be nothing to do in an emergency except stop the train and use a lineside or signal ‘phone.