The most common type of fuel pump in cars is the electrical fuel pump, which is typically inside the fuel tank. Older vehicles sometimes use a mechanical fuel pump outside the fuel tank to deliver fuel to the carburetor to start combustion.
Some cars use a twin fuel pump system, with one pump inside the fuel tank to transfer fuel and a main pump outside the tank. The fuel pump is typically inside the fuel tank, as this location prevents overheating by submerging the pump in the gas itself to cool it down. Submerging the pump also prevents gas vapors escaping, which could cause a fire.