The way this system operates is by the engine’s camshaft having an extra eccentric lobe that operates a lever on the pump. The pump then has a flexible diaphram that encloses a certain volume of fuel on one side.
While this was an extremely popular and common method for fuel pumps in older vehicles, things became more electric as engines moved away from carburetors and towards fuel injection.
The reason for this was because fuel injection systems operate more efficiently at a higher fuel pressure than mechanical pumps can generate.
Generally you will find that electrical fuel pumps are located in the fuel tank in order to use the fuel in the tank to cool the pump and ensure a steady supply of fuel. The pump creates positive pressure in the fuel lines, which helps push the gasoline to the engine.
As you place the pump in the tank, this puts the component least likely to handle gasoline vapor well farthest from the engine, thus submersing it in a cool liquid.
By placing the fuel pump inside the tank, you will also find that it is less likely of starting a fire. The reason for this is that liquid fuel will not explode, and by submerging the pump in the tank you eliminate the chance of a fire starting.
Another way you reduce the chance of a fire starting is by the constant flow of the gasoline to the engine. This reduces the chance of fuel boiling because it is never kept close to the hot engine for too long.
There are several advantages to having an electrical fuel pump over a mechanical fuel pump, which is why almost all modern cars are electrical. They are safer, more convenient and much more useful of getting fuel to your engine efficiently.
As time evolves, there may be an even more efficient fuel pump that replaces the electrical fuel pump. But for now, drivers can rest assured that they are safe with their electrical fuel pump.