Oh I think I know what you're talking about now. I think they worded it in a confusing way. The "heat is absorbed by the gas" is the reason why the piston can do work. In a heat engine, heat is converted into work (PV work, if i'm not mistaken). For example, in a combustion engine the explosion of gasoline creates heat in the system, thus increasing the kinetic energy of the gas in the system. An increase in gas KE within a closed system eventually results in some form of energy transfer.
In chemistry lab this often means a beaker or flask exploding because someone left the stopper on while heating it. In the case of the heat engine, however, the gas expansion leads to the expansion of the container via the movement of a piston. When the piston moves, the heat energy is converted into the mechanical energy that powers whatever your heat engine is connected to.
So to go back to your original post.
They kind of wrote it out of order. Heat from the combustion of gasoline is absorbed by the gas within the heat engine/chamber/system. Since it is a closed system, the heat can't just dissipate or diffuse away (a camp fire or a fire in a metal trash can would be heat leaving an open system). So what happens? The gas in the system absorbs it, expands and pushes the piston up, thus creating work (force required to expand (displace) the piston). So you input gasoline, the system explodes it, then harnesses that heat to create the work which is then exerted on the surroundings.
Edit: Post 2000!