A steam engine works by converting heat energy from steam into mechanical work. Water is first heated in a boiler until it turns into high-pressure steam. This steam is directed into a cylinder where it expands and pushes against a piston. As the piston moves back and forth, it transfers energy to a connecting rod and crankshaft, producing rotary motion. The movement can then be used to power machinery, wheels, or generators. After pushing the piston, the steam is released or condensed, making space for fresh steam. By repeating this cycle, continuous motion is achieved. Valves control the timing of steam entry and exhaust, ensuring efficiency. The efficiency depends on pressure, temperature, and how effectively steam is condensed. This principle allowed steam engines to drive locomotives, ships, and early factories. In essence, the engine transforms thermal energy into kinetic energy through controlled steam pressure.