A spiral (sometimes called a spiral loop or just loop) is a technique employed by railways to ascend steep hills.
A railway spiral rises on a steady curve until it has completed a loop, passing over itself as it gains height, allowing the railway to gain vertical elevation in a relatively short horizontal distance. It is an alternative to a zig-zag, and avoids the need for the trains to stop and reverse direction while ascending. If the train is longer than the length of each loop it may be possible to view it looping above itself.
The term "loop" is also often used for a railway that curves sharply and goes back on itself: If the railway crosses itself, then it forms a spiral; otherwise, it forms the much more common horseshoe curve or bend.
A spiral loop is not the same as the transition spiral or spiral easement used to provide a transition from a tangent into a horizontal circular curve. Spiral easement is used to avoid abrupt changes in the sideward acceleration experienced by a railway vehicle and the passengers in the vehicle approaching the horizontal circular curve and to prevent abrupt forces and discomfort.
The Darjeeling Himalayan Railway originally had five or six spirals but only five in operation at any one time. The line also has six reverses or zig-zags.