Piston engines are designed to produce mechanical energy, torque, which is used to move a propulsion unit. In aircraft, it is the propeller, in cars, the wheel. There may or may not be a transmission. Heat produced is waste (after expansion to drive the piston) and is removed by a cooling system and exhaust. The enclosed piston is more efficient than a jet at producing mechanical energy per unit of fuel, just as the cannon is more efficient than the recoiless rifle at propelling a shell. With pistons, combustion of fuel is not constant, allowing heat sinks such as air and water flow, to remove the heat before temperatures get too hot.
Good conductors of heat, such as aluminum, brass, and chromium steel, work well with these applications, but high fuel burn rates can lead to overheating. Piston engines are RPM limited, and simply cannot produce enough power as ...
Jets. Capable of producing much more thrust by using heat resistant metals and running at much higher RPM. Here the "internal combustion" is replaced with less efficient but lighter jet engines. Jets have an "Ace in the Hole", the ability to maintain thrust at higher altitudes, where greater TAS off-sets lower propulsion efficiency.
This is why the 747 has double the ton miles/per gallon fuel burned efficiency compared with even the mightiest of the piston engined transports. Lower and slower, piston props are better.