Dear Student,
The steam engines convert the thermal (heat energy ) to kinetic energy.
The heat in the gases move the pistons , these moving pistons can drive anything attached to it.
Thus conversion of heat energy to kinetic energy takes place.
Regards!