Train whistles used to mean a lot more back before phones, walkie-talkies, and other ways for the engineer to communicate with the rest of the crew.
For example, one urgent toot! signaled the brakeman to jump from car to car, applying the brakes on each one, which at one time was the only way to stop the train.
Other signals include the following:
Bell while in station – Passengers take your seats.
TOOOOT TOOOOT – Train ready to proceed.
TOO TOO TOO – Backing up.
TOO TOO TOO TOO TOO TOOOOT – Succession of short blasts means nothing to the crew, so used to scare cattle off the track.
TOOOOT TOOOOT TOO TOOOOT – Approaching a public crossing.
TOOOOT TOOOOT TOOOOT TOOOOT TOOOOT TOOOOT TOOOOT – Train is one mile from the next station.