Motive power to a train - the train's engine.
Locomotive is a generic term for the vehicle, or vehicles, providing the motive power to a train. In Digital Command Control, the locomotive can be a single unit, a group of units coupled together in an MU (multiple unit), or multiple units distributed in the train, but responding to a single command set as an MU.
They can be powered by electricity from a third rail or overhead wires, a diesel or gasoline engine, diesel-electric, or steam. Some steam locomotives are fireless, where their pressure vessel (boiler) is filled with steam under pressure and refilled as needed.