A locomotive or engine is a rail transport vehicle that provides the motive power for a train.
What is the last car on a passenger train called?
observation car
The observation car almost always operated as the last car in a passenger train, in US practice. Its interior could include features of a coach, lounge, diner, or sleeper.