A fuel pump pumps the fuel from the fuel tank to the engine. In a carburetted engine, a low pressure mechanical pump is used and is located outside of the engine. On the other hand, fuel injected engines use high pressure pumps, which are inside the fuel tank.
Previously, most cars that had carburetted engines used the mechanical fuel pumps to transfer fuel. Nowadays, most engines have moved away from the carburettor and instead use the fuel injection system, as fuel injection systems are more efficient. This means that most fuel pumps are now electric rather than mechanical.
Electric fuel pumps are usually mounted inside the fuel tank. This allows the fuel in the tank to keep the pump cool and significantly reduces the likelihood of the tank catching fire. Another safety feature of electric fuel pumps is that the fuel not used is circulated back into the tank. This reduces the risk of the fuel boiling, as it is not kept in contact with the engine for longer than is necessary.
One cause of a car not starting is that there is a problem with the fuel pump. A correctly working fuel pump will result in a vibrating noise near the gas tank when the engine is running. If you can't hear this, it's likely that you need to replace your fuel pump. Another indication of a faulty fuel pump is if the car is jerking while you are accelerating.
If you need to replace your fuel pump, it is worthwhile sourcing the new pump yourself. There are a number of websites that you can buy from. Be sure to compare prices first, to get the best value. Even if you are on a tight budget, it is recommended that you get a professional to do the installation, particularly if you need to remove the fuel tank to access the pump.