To keep trains from bumping up and down too much, railroad track is welded together a number of ways. I don’t know which way these pieces were welded, but I know it can be done electrically (through arc welding), or through a combustion synthesis reaction (like thermite).
The combustion synthesis reaction was nice for when you didn’t have a way to haul an arc welder to the middle of nowhere. Instead, you pushed the two ends of track together, covered the surface with the reactants, packed sand around it, and then heated the entire mess. Once the reaction started, it gave off heat, sustaining the reaction and melting the iron. Once the reactants were used up, the rail cooled, and the sand cast was broken away.
This picture represents only a few miles of track in the town of Socorro, NM. There’s a lot of welds out there, and it’s hard to tell which were done using which method, but thankfully, they are all of equal quality.