Headshunt

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.

Platform track and run-round loop at Toyooka Station , Hyōgo, Japan, the terminus of the line from Miyazu
Sequence at a terminal headshunt:
1. train arrives at the station
2. locomotive is detached from the train and moves into the headshunt
3. locomotive reverses and the points are switched
4. locomotive travels along the passing loop to pass the cars
5. locomotive reverses direction and the points are switched
6. locomotive couples to the opposite end of the train
7. locomotive reverses and the train departs
Melbourne University tram stop has three reversing headshunts in succession, between the two running lines.
Diagram of a headshunt and run round loop