To run a steam engine, coal or oil are burned in a firebox . This heats up water in the boiler , eventually turning it into highly pressurized steam.