The fuel pump is the part of your car that moves the gasoline through the fuel system from the tank to the fuel injectors (in newer cars) or carburetor (in older cars). Most modern cars have an electric fuel pump mounted inside the gas tank. Older cars tend to have a mechanical fuel pump mounted inside the engine compartment. The pump is usually cylindrical in shape, about 3 or 4 inches wide and 6 or 8 inches tall. An in-tank pump is usually accessed through the trunk (lift up the carpet in the back and you should see a hatch of sorts that provides access). Since a pump mounted in the engine compartment is driven by the engine, it will tend to be mounted on or near the engine.
Just like any other part on the car, the fuel pump is prone to failure. I have never personally had one fail, but I know many people who have had problems with them. Since they function continuously when the car is running, it is reasonable that they eventually wear out. Typically, malfunctioning or broken fuel pumps are not repaired, they are simply swapped for a new one. If your fuel pump is completely broken, the car will not start because the engine will have no gas to burn. If the fuel pump is working poorly, it is possible that your car will start with difficulty or not at all and you will probably notice a lack of power, slow acceleration, slow throttle response, a rough idle, stalling, and reduced fuel economy.
The cost of a fuel pump depends on the make and model of your car. They can range anywhere from $50 to $200. Installing a fuel pump does not take very long; in most cars the pump is easily accessable and readily removable. You should expect to pay the going rate for one or two hours of labor.
Thanks to Transitional Man for pointing out that:
"Many fuel pump failures come from debris being ingested because the fuel tank runs dry" (a good reason to fill your tank before it gets too low)
"Modern cars have two pumps, one in the tank, one near the engine. Both are electric..."