The engine just dies — at a red light, rolling to a stop, or worst of all, mid-drive. Stalling is a symptom with several unrelated causes, and the single most useful thing you can note is the pattern: only at idle, only when hot, or truly random. Each pattern has its own short list.
Cheapest and easiest first. Don't buy parts until the checks below point at one.
The idle-only stall. Carbon builds up around the throttle plate until idle airflow is choked off, and the engine dies as you roll to a stop — but restarts and drives fine. Keeping it alive with a little gas pedal confirms the direction.
Cracked hoses or a leaking intake gasket let in air the computer didn't measure. The idle gets rough and low, and the engine stalls at stops — often with lean codes stored.
The scary-pattern stall: the engine cuts out while driving, often when fully warm, then restarts after cooling off as if nothing happened. The sensor dies with heat and revives cold, which is why it's so often misdiagnosed.
Stalls under load — merging, climbing a hill, accelerating — point at fuel delivery that can't keep up. A pump on its way out often gets noisy or the car hesitates before it ever fully stalls.
A dirty or failing MAF sensor feeds the computer bad air data, and the mixture goes wrong enough to stall, especially right after starting or at idle.
A dying alternator or a bad battery connection can drop system voltage until the electronics quit. Usually travels with dimming lights, a battery warning, or electrical weirdness first.
Stalling while driving removes power steering and power brake assist when the engine dies — the car still steers and stops, but both take much more effort. If it stalls repeatedly, stalls in traffic, or won't restart, have it towed rather than limping it. Practice the drill: neutral, hazards, coast to the shoulder.