Cars stall due to many causes. Fortunately, this usually does not signal a major repair to your vehicle, and it can generally be fixed through some relatively minor adjustments or repairs.
Consider the complexity of your car before beginning and take your car to a trusted repair shop. Modern cars (mid-nineties or later) are extremely computer controlled, and it will be difficult for you to make any adjustments. You will want to take it into the shop to address this problem.
The stall is likely caused by either a problem in the electrical system or in the fuel system. Your engine stops running because it is not igniting gas in the cylinders, this occurs either because there is not any gas to ignite, or because it lacks the electrical charge to ignite it.
Drive the car up and down steep hills. Does this change the performance of the engine, or cause it to stall? This might indicate a clogged fuel filter. Replacing the fuel filter is relatively cheap and easy once you find out where it is located.
Does the car idle roughly and stall when at idle? If your car has a distributor, you may need to adjust the timing. With the right tools and know how, this is an easy and free task. If your vehicle has fuel injection, you can check the injector by using a screwdriver or mechanics scope. The injectors will make a clicking/snapping sound if working. No sound may indicate a bad injector available at most DIY auto parts stores. It could also indicate an electrical failure with the circuit that drives the fuel injector. Also, check the ICM, idle control motor that controls the air mixture.
if your car has a distributor, you might consider changing the cap, rotor, wires and plugs. This is effectively a tune up. This can usually be done even by a relative novice to car repair, and take a couple of hours with the right tools. It seems counterintuitive, but even the wires and distributor decay over time, and transmit less electricity. This tune up may solve your stalling problem — even if not, your car should run better and get better mileage.
If your car diesels when you turn off the ignition, it means that your car most likely has a carburetor and the idle speed adjustment is too high. Dieseling describes the situation where you turn off the key, yet the car continues to run for a few seconds or longer, eventually sputtering to a stop. This does not occur on fuel-injected vehicles because when the ignition is turned off so is the fuel supply to the engine as well as the spark plugs.
In rare cases, your car may stall due to what is commonly called a “vapor lock” which is a situation that occurs when the fuel lines supplying gas to the engine become hot enough to boil the gas in the line turning it into vapor. Fuel pumps are designed to pump liquid and not “vapor” and do not occur on fuel injected engines. However, a clogged fuel tank vent system can cause a vacuum in the fuel line that causes fuel to eventually stop reaching the engine. This also is a problem that is unique to carbureted engines. Fuel injected engines commonly have “closed loop” fuel delivery systems that make this condition unlikely to occur. Try opening your gas cap. If you hear a “whooshing” sound, like when you open a can of coffee, it means the gas tank is not vented. Now try starting the car. It should work after a couple tries. This is usually found only in older cars. If you have it, this will probably happen again, so your tank vent system should be checked for blockage. More often than not, the problem can be traced to a cheap replacement locking gas cap. A cheap fix is to drill a small hole in your gas cap to allow air in and prevent the vacuum from forming, but the gas cap should not be left this way.