Typically, the ends of the rails are cleaned, aligned flat and true, and spaced apart 25 mm (1 in). This gap between rail ends for welding is to ensure consistent results in the pouring of the molten steel into the weld mold. In the event of a welding failure, the rail ends can be cropped to a 75 mm (3 in) gap, removing the melted and damaged rail ends, and a new weld attempted with a special mould and larger thermite charge. A two or three piece hardened sand mould is clamped around the rail ends, and a torch of suitable heat capacity is used to preheat the ends of the rail and the interior of the mould. The proper amount of thermite with alloying metal is placed in a refractory crucible, and when the rails have reached a sufficient temperature, the thermite is ignited and allowed to react to completion (allowing time for any alloying metal to fully melt and mix, yielding the desired molten steel or alloy). The reaction crucible is then tapped at the bottom. Modern crucibles have a self-tapping thimble in the pouring nozzle. The molten steel flows into the mould, fusing with the rail ends and forming the weld. The slag, being lighter than the steel flows last from the crucible and overflows the mould into a steel catch basin, to be disposed of after cooling. The entire setup is allowed to cool. The mould is removed and the weld is cleaned by hot chiselling and grinding to produce a smooth joint. Typical time from start of the work until a train can run over the rail is approximately 45 minutes to more than an hour, depending on the rail size and ambient temperature. In any case, the rail steel must be cooled to less than 370 °C (700 °F) before it can sustain the weight of rail locomotives.
When a thermite process is used for track circuits – the bonding of wires to the rails with a copper alloy, a graphite mould is used. The graphite mould is reusable many times, because the copper alloy is not as hot as the steel alloys used in rail welding. In signal bonding, the volume of molten copper is quite small, approximately 2 cm3 (0.1 cu in) and the mould is lightly clamped to the side of the rail, also holding a signal wire in place. In rail welding, the weld charge can weigh up to 13 kg (29 lb). The hardened sand mould is heavy and bulky, must be securely clamped in a very specific position and then subjected to intense heat for several minutes before firing the charge. When rail is welded into long strings, the longitudinal expansion and contraction of steel must be taken into account. British practice sometimes uses a sliding joint of some sort at the end of long runs of continuously welded rail, to allow some movement, although by using a heavy concrete sleeper and an extra amount of ballast at the sleeper ends, the track, which will be prestressed according to the ambient temperature at the time of its installation, will develop compressive stress in hot ambient temperature, or tensile stress in cold ambient temperature, its strong attachment to the heavy sleepers preventing buckling or other deformation. Current practice is to use welded rails throughout on high speed lines, and expansion joints are kept to a minimum, often only to protect junctions and crossings from excessive stress. American practice appears to be very similar, a straightforward physical restraint of the rail. The rail is prestressed, or considered "stress neutral" at some particular ambient temperature. This "neutral" temperature will vary according to local climate conditions, taking into account lowest winter and warmest summer temperatures. The rail is physically secured to the ties or sleepers with rail anchors, or anti-creepers. If the track ballast is good and clean and the ties are in good condition, and the track geometry is good, then the welded rail will withstand ambient temperature swings normal to the region.