That depends;
on an older car I'd suggest that it's probably the condenser, but if it has an electronic ignition I'd also check the ECM and coil.
no gas
Could be bad spark plug wires.
It needs a tune-up..ie spark plugs air filter new wires etc
What causes a car to jerk while driving can be based on many factors. A car can sputter due to engine compression issues, bad transmission, engine misfire, bad spark plugs or even low fuel.
The problem is likely an electrical one - check your spark plug leads from the distributor to the plugs.
Timing is way off or spark plug wires incorrectly connected.
If the car dies while idling, the timing might be off. Other causes can include a clogged fuel filter or a bad spark plug.
It may be that the spark plug is dirty. Try cleaning it
heat causes pressure, pressure causes friction, friction causes spark, spark causes KABOOM! all in a split second
The timing of the engine is off or the spark plug wires have been hooked up incorrectly.
This is often a cracked head gasket between oil passage and a cylinder.
timing belt, spark plugs, wires, fuel/air mix, fuel injectors