Almost all train wheels have a curved projection, a flange, on one side to keep the wheels, and hence the train, running on the rails when the limits or tests of alignment are reached: when a bend is taken at appropriate speed, when there are strong sidebreezes, and to withstand e.g. most common emergent defects in trackbed, rail and mild debris.
The running surface of most is conical, serving as the primary means of keeping the train’s motion aligned with the track the wheels are fixed on their axles, and as the mass of the train pushes it towards the outside of the curve, the outside wheel rides up to contact the rail at a larger diameter while the inside wheel drops down to contact its rail at a smaller diameter, travelling a smaller distance for each rotation of the axle, and steering the train round the curve.
In rail transport, guard rails or check rails are rails used in the construction of the track, placed parallel to regular running rail to keep the wheels of rolling stock in alignment to prevent derailment. They are generally used along areas of restricted clearance, such as a bridge, trestle, tunnel, or level crossing.
On sharp curves, guard rails may be placed inside the inner rail, where they engage the back of the flange of the wheel on that side.Guard rails may be incorporated in switches, where they serve to prevent derailments caused by a train’s wheels passing through the wrong side of the frog (the point where the straight and diverging rails cross).