Typically fuel pump in gasoline fuel injection systems is supplied with battery voltage and runs at constant speed. In this setup fuel pump capacity is set to the level where it would be able to supply enough fuel at required pressure to the engine in any operating mode. In other words, fuel pump is capable to supply more fuel at set pressure than engine would ever need – essentially for most conditions fuel pump works much stronger than it is needed. Excess of fuel and pressure in this type of system would be regulated by mechanical fuel pressure regulator and returned back to fuel tank.
Less common are systems where fuel pump operation is regulated by voltage supplied to the pump from some kind of separate fuel pump control module. In this case pump operates at reduced capacity when there is no need for large amount of fuel to be supplied to the engine. This somewhat reduces fuel pump operating nose, raise of fuel tank temperature (this temperature affects evaporative emissions) and to the very small extent reduces fuel consumption due to reduced load on alternator. This comes at the price of increased complexity and makes system a bit more difficult to diagnose problems.