On steam engines and throttle controlled engines (gasoline, kerosene, oil, natural gas) - the governor controls the throttle position to keep a steady speed.
On Hit & Miss engines the governor holds the exhaust valve open when the engine gets up to speed. Since the engine just keeps moving air in and out of the exhaust as the piston goes up and down, the engine never creates a vacuum to pull a new fuel/air mixture into the cylinder. Once the engine slows down enough....the governor releases the exhaust valve, and the cylinder pulls a new fuel/air mixture into the cylinder, and the engine fires as many revolutions as it requires to get back up to speed. If the engine is not under a load the engine can freewheel for a long time - under load the engine may fire several times before it coasts.
In this video you can see how the top of the cam lobe bumps the exhaust pushrod every rotation of the cam - but only when the engine has slowed down enough does the governor remove the latch so the exhaust valve can operate. (The intake valve operates on suction and opens when the piston creates a vacuum in the cylinder).
https://www.youtube.com/watch?v=BBL2Gjq8Xus