A steam locomotive is a train that uses wood , coal or oil , ( but mostly coal ) , to heat water in a boiler , that turns into steam which is used in pistons to power the train . Steam locomotives are not widely used anymore due to their operations costs , especially the fuel costs , steam locomotives are usually only used on tourist railroads now . Because steam locomotives included one or more steam engines , they are sometimes referred to as `` steam engines '' .