If you were to remove the front cover off of any diesel engine you will come across a series of drive gears. No belts or chains here, you're looking at the timing gears that make this diesel engine run. Each gear is timed to each other with specially placed marks that must be lined up during assembly.
Enlarge this picture by clicking on it and you should see the timing marks on the crank and cam gears. They look like center punch marks one on the crank and two marks on the camshaft.
The crankshaft and camshaft gears are driven together to provide proper valve and piston timing for combustion to occur. Fuel injection timing on the Cummins C Model diesel engine (pictured here) is accomplished by inserting a pin into the injection pump drive gear (top right).
The pump in turn has a pin in the side of it's housing that has to be removed, flipped around & aligned into the injection pump shaft setting it for injection on #1 cylinder.
The oil pump is also driven off of the crank gear and idler gear. The air compressor is located lower right without it's drive gear installed.