Shunting, in railway operations, is the process of sorting items of into complete trains, or the reverse. In the United States this activity is known as "switching".
Motive power is normally provided by a locomotive known as a shunter (in the UK) or switcher (in the USA). Most shunter/switchers are now diesel-powered but steam and even electric locomotives have been used. Where locomotives could not be used (e.g. because of weight restrictions) shunting operations have in the past been effected by horses or capstans.
The terms "shunter" and "switcher" are applied not only to locomotives but to employees engaged on the ground with shunting/switching operations. The task of such personnel is particularly dangerous because not only is there the risk of being run over, but on some railway systems—particularly ones that use buffer-and-chain/screw coupling systems—the shunters have to get between the wagons/carriages in order to complete coupling and uncoupling. This was particularly so in the past. The Midland Railway company, for example, kept an ambulance wagon permanently stationed at Toton Yard to give treatment to injured shunters.
The main tool of shunters working with hook-and-chain couplings was a shunting pole, which allowed the shunter to reach between wagons to fasten and unfasten couplings without having physically to go between the vehicles.