A derail or derailer is a device used to prevent fouling of a rail track by unauthorized movements of trains or unattended rolling stock. The device works by derailing the equipment as it rolls over or through it.
Hinged derail with automatic blue flag
A derailed train car at a closed siding
A derail device installed on a siding at Glen Haven, Wisconsin, oriented to protect track located off the bottom of the picture
Derail on Nemuro Main Line, JR Hokkaido. It is set so that a train proceeding away from the camera will remain on the track.
In rail transport, a derailment is a type of train wreck that occurs when a rail vehicle such as a train comes off its rails. Although many derailments are minor, all result in temporary disruption of the proper operation of the railway system and they are a potentially serious hazard.
Train wreck in Leavick, Colorado in 1897
A c. 1890s picture by "C. Petersen" Fayette County, Texas [?] of a train derailment
A derailed freight train in Farragut, Tennessee (2002)
Detail of derailed express train in Prague, Czech Republic (2007)