A Locomotive is a machine used to haul a train. In the 19th century, locomotives were powered by steam. During the 20th century, there was a transition from steam to electric and diesel power.