A derail or derailer is a device used to prevent fouling (blocking or compromising) of a rail track (or collision with anything present on the track, such as a person, or a train) by unauthorized movements of trains or unattended rolling stock.
The most common form is a wedge-shaped piece of steel which fits over the top of the rail.
[7] If a car or locomotive attempts to roll over it, the wheel flange is lifted over the rail to the outside, derailing it.
[8] It can be manually or remotely operated; in the former case it will have a lock applied to prevent it from being moved by unauthorized personnel.
[7] These are basically a complete or partial railroad switch which directs the errant rolling stock away from the main line.