A cylinder refers to a cylindrical metal component that guides the piston in a straight reciprocating motion within the cylinder. Air in the engine cylinder converts thermal energy into mechanical energy through expansion; The gas is compressed by the piston in the compressor cylinder to increase pressure.