The hex nut on the fuel pump is driven from the camshaft.

on the inside is an angled plate which changes rotational movement to vertical movement

This pushes down on 3 pistons in sequence. The higher the revs the faster the pump works.

Under the piston chambers is a diaphragm (which separates the hydraulic side to the fuel side) which is operated by the pistons

to pressurize the fuel, The fuel pressure is regulated by the fuel pressure regulator. ( separate from the fuel pump ).

The cylinder on the bottom of the pump is a internal pressure regulator on the hydraulic side.

The pump fails as the oil seal is pushed out of its seat leaking hydraulic fluid into the cam casing.