Such headshunts are typically installed at a terminal station to allow the locomotive of an arriving train to move to the opposite end of (in railway parlance, 'run around') its train so that it can then haul the same train out of the station in the other direction (assuming, of course, that it is a locomotive equipped to run in either direction; for locomotives that only operate in one direction, a wye or turntable needs to be provided to physically turn the engine around, as well as a run-around track).
Found primarily on metro systems, rapid transit light rail networks, and tramways, a 'reversing headshunt' allows certain trains or trams to change direction, even on lines with high traffic flow, whilst others continue through the station.
[2] Although a common procedure for passenger trains when the majority of them were locomotive-hauled, the maneuver is now becoming rarer on public service railways.
Runaround tracks are used in freight rail service in order to back cars into spurs or to change directions to keep the locomotive at the front of the train for transport.
The locomotive leaves the cars on the runaround track or the main line, goes around, and hooks up to the other end of the train.