Nikolaus Otto in 18761, hence it is also known as the Otto cycle. The technically correct term is actually four stroke cycle. The four stroke engine is probably the most common engine type nowadays. It powers almost all cars and trucks.
The four strokes of the cycle are intake, compression, power, and exhaust. Each corresponds to one full stroke of the piston, therefore the complete cycle requires two revolutions of the crankshaft to complete.
Intake. During the intake stroke, the piston moves downward, drawing a fresh charge of vaporized fuel/air mixture. The illustrated engine features a ‘poppet’ intake valve which is drawn open by the vacuum produced by the intake stroke. Some early engines worked this way, however most modern engines incorporate an extra cam/lifter arrangement as seen on the exhaust valve. The exhaust valve is held shut by a spring (not illustrated here).
Compression. As the piston rises the poppet valve is forced shut by the increased cylinder pressure. Flywheel momentum drives the piston upward, compressing the fuel/air mixture.
Power. At the top of the compression stroke the spark plug fires, igniting the compressed fuel. As the fuel burns it expands, driving the piston downward.
Exhaust. At the bottom of the power stroke, the exhaust valve is opened by the cam/lifter mechanism. The upward stroke of the piston drives the exhausted fuel out of the cylinder.
This animation also illustrates a simple ignition system using breaker points, coil, condenser, and battery.
Larger four stroke engines usually include more than one cylinder, have various arrangements for the camshaft (dual, overhead, etc.), sometimes feature fuel injection, turbochargers, multiple valves, etc. None of these enhancements changes the basic operation of the engine.