Horns on trains are used to communicate the train’s activities, and are sounded to increase safety by warning pedestrians and drivers of approaching trains. The rules vary by country, but the following is applicable in the USA.
The Federal Railroad Administration requires engineers to sound train horns at all public grade crossings. Train horns are also sounded before a stopped train moves: different series of whistle blasts are used to communicate what trains are about to do.
For example, three short horn sounds mean a stopped train is about to back up. Two long, a short, and then a long horn blast indicates a train is approaching a public grade crossing. In this case, the engineer begins to signal not less than 15 seconds, but not more than 20 seconds, before reaching the crossing. This rule applies when the train speed is below 45 mph; at speeds greater than 45 mph, trains are still required to sound their horn at the designated location.
Other horn signals and their meanings include:
Short: applying air brakes while standing.
Long-long: Proceeding. Releasing air brakes.
Short-short-long: Acknowledging a flagman’s stop signal.
Short-short: Acknowledging any signal not otherwise provided for.
Short-short-short: backing up.
Short-short-short-short: calling for signals.
Short: approaching passenger stations.
Short-long: inspect train for a leak in the brake pipe system or for brakes sticking.
Long-short: when running against the current of traffic. (a) approaching stations, curves, or other points where view may be obscured and (b) approaching passenger or freight trains and when passing freight trains.
Succession of sounds: warning to people and / or animals.