The two-stroke internal combustion engine differs from the four-stroke engine by completing the 4 processes of intake, compression, combustion, exhaust in only two strokes of the piston.
How four strokes engines works:
Intake: The piston travels down the cylinder while the intake valve is opened to allow a mixture of fuel and air to enter the combustion chamber.
Compression: The intake valve is closed and the piston travels back up the cylinder thereby compressing the gasses.
Combustion: The spark plug ignites the compressed gas causing it to explode, which forces the piston down.
Exhaust: The piston rises up the cylinder as the exhaust valve is opened, allowing the piston to clear the chamber to start the process over.
Two Stroke is accomplished by using the beginning of the compression stroke and the end of the combustion stroke to perform the intake and exhaust functions.