A locomotive was a large self-propelled workhorse vehicle used to provide the drive power for a train.
It was typically powered by steam, electricity or diesel, that was utilized for transporting freight or passenger cars along a railroad.
After Jonathan Archer restored a damaged timeline, a locomotive could be seen in the time stream as the timeline realigned itself. (ENT: "Storm Front, Part II")
Beverly Crusher's holodeck simulation of the Orient Express featured the locomotive, along with the rest of the train. (TNG: "Emergence")