For light automotive use, governors on in-line pumps are usually mechanical or pneumatic.
A mechanical governor uses rotating fly weights to control movement of the fuel control rack against a spring. Removing the load from the engine lets its speed rise. Centrifugal force pushes out the weights, which push a sleeve against the spring. The force from the spring tries to push the rack to the maximum fuel position. The force on the sleeve from the fly weights acts against the spring to try to push the rack to the minimum fuel position.
For any governor position, the fuel control rack determines the volume of fuel delivered, and therefore engine speed. During idling, the governor prevents the engine from stalling. It also stops it from over-speeding.
Mechanical governors in automotive use are called idling and maximum speed governors, because idling speed and maximum speed is all they control. They can also be called limiting speed governors. For other throttle positions, the operator determines the rack position, by moving the position of the floating link.
A pneumatic governor has a manifold-mounted venturi unit, linked by tubing to a sealed, diaphragm assembly on the in-line injection pump housing. This venturi unit has a main venturi, and an auxiliary one. A throttle butterfly controls airflow through the venturi and into the engine.
The venturi is narrow, and shaped so the air speeds up as it passes through.
A similar effect occurs around aircraft wings. The shape of the wing section speeds up the airflow over the top of the wing, and creates a low-pressure area there, lower than the atmospheric pressure below. The result is an upward force that provides lift for the aircraft.
The shape of the venturi is designed to apply the same principle.
When the engine is not running, the diaphragm spring pushes the diaphragm and fuel control rack, towards the full-fuel position.
With the engine running, at idle, the throttle butterfly is almost closing the intake, and air flows through the auxiliary venturi at high velocity. This produces low pressure there, which is transferred through the connecting hose to the sealed chamber on the spring side of the diaphragm.
Atmospheric pressure on the pump side now forces the diaphragm and rack towards the no-fuel position. This reduces the effective pump stroke, and the amount of fuel injected.
Depressing the accelerator allows more air to enter the engine, but decreases the air velocity through the auxiliary venturi. Pressure in the sealed chamber rises, and allows the spring to move the diaphragm, and control rack, against atmospheric pressure, to increase the fuel delivered. The diaphragm position at any given time is determined by the air velocity through the auxiliary venturi, in accordance with engine speed, and load. This provides a rack setting which allows the correct quantity of fuel to be injected, to match the operating condition.