A live steam locomotive uses steam created by heating water in a boiler to power its cylinders, which move the pistons and drive the locomotive's wheels. Steam is regulated and directed to the cylinders to create reciprocating motion, which is then converted into rotary motion to move the locomotive forward or backward. The operation of valves controls the flow of steam into the cylinders, enabling the locomotive to accelerate, decelerate, and change direction.