There are several different problems that might cause a car to stop running or stall while it is being driven; however, according to CarsDirect, the three most likely culprits are issues with the electrical system, fuel system or vacuum system. A variety of issues anywhere along the line could cause your car to stall out while idling, or even in the middle of being driven.
A problem with the fuel system means that your car's engine is not receiving an adequate amount of gas to power it, while a problem with the electrical system means that it is not able to ignite the fuel it is receiving. The car's vacuum system helps maintain optimal pressure between the interior and exterior of the engine, and a crack or leak may cause the engine to stall.
Sometimes, the problem that causes your car to stall can be treated, or at least diagnosed, without a mechanic. Check the tubes and wires leading to and from your engine for any obvious signs of wear or cracking. You might also want to consider performing the inspection with the car's engine running so you can listen for whistling or other sounds that might indicate a break in one of the components.