The majority of general aviation aircraft use what’s referred to as a reciprocating engine. Mechanical energy is created through the back and forth movement (hence the name reciprocating) of pistons located in each cylinder which in turn drive a crankshaft that is directly connected to the propeller creating the required thrust. In the figure below you can see the major components of your typical reciprocating engine.
A spark ignition four-stroke piston engine is the most common variant of the reciprocating engine that you will find in training aircraft. Four-stroke refers to a complete engine cycle, all four stokes must be accomplished in order to turn chemical energy (fuel) into mechanical energy (thrust). The four strokes are: Intake, Compression, Power, and Exhaust.
As the piston starts a downward travel it allows the intake valve to open inducing the fuel and air mixture into the top of the cylinder. You can essentially think of this as the piston sucking in the fuel/air mixture.
As the piston begins it journey back upwards the intake valves close and the piston compresses the fuel and air mixture in the cylinder. This increases the pressure and temperature of the mixture which will in turn create a higher energy output in the next step.
The now compressed fuel/air mixture is ignited by the spark plugs causing a controlled burning in the cylinder. The burning creates an enormous increase in pressure abruptly forcing the piston back in a downwards motion. This is what creates the immense power to turn the crankshaft.
This final stroke is used to purge the cylinder of the burned gasses within. As the piston begins its final journey back upwards to the cylinder head the exhaust valve opens allowing the burned gasses to escape out of the cylinder.
And the process begins all over again. To allow for smoother operation and continuous power output the engine contains a number of cylinders where the above cycle takes place. The power stroke of each cylinder is timed to occur at different positions then the others; therefore not every cylinder is timed where the power stroke occurs at the same moment. As the transfer of power is more evenly spread out the engine is much more capable of running smoother with less vibration.