Train horns have been in use since the first locomotive was invented. Engineers use the horns to scare wild animals off the track, and to alert oncoming traffic of the presence of a train approaching a railroad crossing, they are used also to alert passengers that are boarding that it is time to leave. Railroad employee's often use a train horn when they are working on the tracks and during the switching operations.
Locomotives used air horns, much like those used by trucks back when trains were coal or steam powered. With the advent of diesel engines in locomotives, these horns were not powerful enough to be heard above the noise of the engines. Truck horns were improved upon by engineers; oscillation was implemented to push air through a power chamber and against a nozzle to create the familiar sound of a train horn. Where the diaphragm is placed affects how much air can be pushed through the horn, making the sound of the horn more or less loud. Until around 1990, a technique known as "feathering" was used employing the manual pull cord to modulate the sound of the horns. Since the early 1990's push buttons and pedals mounted in the floor of the cab have become the norm to control the horns.
Recently, train horns have become popular with car and truck enthusiasts as an addition to their customized vehicles. Of course, train horns are not generally manufactured as vehicle accessories, since people are accustomed to hearing these at a train crossing - this makes them unsuitable for use in traffic and their use is outlawed in many places. Train horns have become controversial in general as many cities have implemented quiet zones where engineers may only operate their horns in an emergency. Unfortunately, these restrictions have lead to many accidents since motorists and pedestrians alike have been unaware of a train's approach.
The sounds of train horns differ in meaning from rail company to rail company, as well as from country to country.
In the U.S., the standard signal given by train horns at a crossing is two long horn sounds, followed by one short and one long. This pattern is repeated until the train has passed the crossing. In Florida, there was a ban on the use of train horns in many locales; however, this ban was lifted in only a few years because of the greatly increased rate of train accidents.
Even though train horns are very annoying there is a definite purpose for them and people should not abuse them; or try to make quite zones where a train horn should be sounded.