Most car engines are four-stroke, which means that each piston moves up and down twice (two up-strokes, and two down-strokes, making four strokes), to produce one pulse of power. In a four-stroke engine, the four strokes are:
The piston moves down the cylinder, sucking air/fuel mixture from the inlet manifold into the cylinder and combustion chamber through the inlet valve.
The valves are closed and the piston moves up the cylinder, compressing the mixture until it’s ignited in the combustion chamber at the top of the stroke.
The valves stay closed as the piston is pushed down the cylinder due to the expansion of the burning mixture.
The piston moves back up the cylinder (because of the momentum produced during the power stroke), and the burnt gases are pushed out through the open exhaust valve. The cycle then starts again, with another intake stroke.