Question: how are derailed trains fixed?
Answer: With simple wagon derailments where the final position is close to the proper track location, it is usually possible to pull the derailed wheelsets back on to the track using rerailing ramps; these are metal blocks designed to fit over the rails and to provide a rising path back to the track.