Previously we looked at an interesting GIF animation of a machine for constructing railways: railway construction machine GIF.
Here's a look at the technology used to destroy and sabotage trains and railways for military purposes. The two main strategies were to force derailment of the train (either by altering the track or using carefully-triggered explosives), or to demolish the railway ties or rails. One was a viable option if you could clandestinely plant an explosive device on the train or tracks. The other was a scorched earth tactic whereby victorious invading forces would destroy the railways of invaded territories.
In the American Civil War, the Union Army used a strategy called "Sherman's Neckties". Named after Major General William Tecumseh Sherman, the technique here was to heat the railway rails, and then twist them into loops resembling neckties. The ties were made into bonfires, and the rails were placed over the fire and twisted when hot. The same tactic used by the Confederacy was referred to as "Old Mrs. Lincoln's Hair Pins." Bent rails could be more easily bent back into shape, but twisted rails had to be re-poured. Here's an old image of the process, plus a reenactment video:
Our railway destruction techniques had advanced by WWII. Here we see a German track destroying mechanism, also called a "rail plough". It rides on the rails and destroys the ties or rails behind it.