* Crankshaft Position Sensor (CKP): This sensor tells the computer the position of the crankshaft, crucial for ignition timing. A faulty CKP sensor will cause the engine to stall unexpectedly and prevent starting. This is a very common cause of these symptoms in older Foci.
* Cam Position Sensor (CMP): Similar to the CKP, a faulty CMP sensor disrupts the ignition timing, leading to stalling and starting issues.
* Ignition Switch: A failing ignition switch might not be providing consistent power to the rest of the system, leading to intermittent starting and stalling.
* Alternator: If the alternator isn't charging the battery properly, the battery will drain, leaving you unable to start the car. While a dead battery will prevent starting, a failing alternator might *also* cause stalling while driving as the voltage drops too low.
* Battery: A weak or failing battery can cause similar symptoms. While it's less likely to cause the car to die while driving (unless it's very weak), a bad battery is a frequent suspect in starting problems. Have it load tested.
* Fuel System Issues: Problems with the fuel pump, fuel filter, or fuel injectors could lead to the engine cutting out while driving. A clogged fuel filter would be more likely to cause gradual performance degradation *before* stalling, however.
* Mass Airflow Sensor (MAF): This sensor measures the amount of air entering the engine. A faulty MAF sensor can cause erratic engine behavior, leading to stalling.
* Wiring/Electrical Problems: Loose connections, corroded wires, or damaged wiring harnesses can interrupt the electrical signals needed for the engine to run consistently. This is a more difficult problem to pinpoint.
What to do:
1. Check the Battery: Have it tested at an auto parts store. A load test will reveal its true health.
2. Check the Alternator: Have the alternator's output voltage checked while the engine is running.
3. Professional Inspection: The most reliable solution is to take your Focus to a qualified mechanic. They have diagnostic tools to check the sensors (CKP, CMP, MAF) and other components, allowing them to pinpoint the exact problem. Describing the symptoms precisely – how often it dies, conditions under which it dies, etc. – will help them.
Don't attempt extensive repairs yourself unless you have significant automotive experience. Improper repairs could worsen the problem. The cost of a proper diagnosis is far less than the potential cost of incorrectly fixing the wrong part.