A four-stroke engine is what you have, pretty much all car and truck engines are 4-stroke
Gasoline or diesel doesn't matter they are 4-stroke
Many motorcycles and snowmobiles use 2-stroke engines
4 strokes means the piston goes up and down 4 times/strokes, to complete 1 power cycle, not 1 RPM, one power cycle
How it works for #1 cylinder
We start with crank pulley at TDC, #1 piston is at the top of its cylinder
1. Intake stroke, intake valve opens as piston goes DOWN, pulling air and fuel into the cylinder from the intake manifold
2. Compression stroke, piston is at the bottom, intake valve is closed, cylinder is "air tight", piston starts going up compressing the air and fuel mix, which heats it up,
Piston is at the top again, TDC << this is the one you want
Spark plug fires between 10 and 30deg BEFORE this TDC, because it takes 15 to 25 degs before air/fuel fully ignites, the higher the RPM the faster the crank is turning so the earlier the spark plug must fire, best full ignition is at 5-10deg AFTER TDC, when piston has good leverage to push down on the crank adding power.
3. Power stroke, piston is at TDC and on its way down, both valves are closed and air/fuel ignites
4. Exhaust stroke, piston is at the bottom and on its way up, exhaust valve opens and piston pushes out the spent air/fuel mix, the exhaust
Piston is back at the top, TDC, exhaust valve closes and intake valves Opens for start of intake stroke
TDC
Intake stroke
Compression stroke
TDC
Power stroke
Exhaust stroke
4 strokes and TWO TDCs have gone by
Spark and Cam sensor are both timed for #1 compression stroke TDC
Not exhaust stroke TDC