What Causes my car to shut off while driving? on 1994 Nissan Sentra

While driving, the engine light suddenly appears, and the car shuts off. The car restarts and drives again. But after a short drive, it shuts off again. What mechanical issue could cause this to happen? Spark Plugs, Fuel Pump, Air Filter?

Asked by for the 1994 Nissan Sentra
Sounds like an intermittent problem, something that takes a lot of time to chase down. Your mechanic will hook up a scanner to see what's going on inside the vehicles computer - it's called 'taking a movie' so the computer will show just what system failed & when. If the budget don't allow for a pro, then start looking for loose connections in wiring.
Are you getting any codes from the computer?
2 more answers
so far i have change the spark plug
On my 1992 Nissan Sentra, it would only stall on sharp right turns. I found a vacuum hose disconnected from the Air Intake manifold to IAC, and my +12 volt distribution bolt was also loose on my Positive battery Terminal. Tightened it and made 10 donut turns in the Mart parking lot and on some Freeway cloverleaf exits- problem gone!

Also, Nissan distributors have a rubber gasket, just below the distributor cap/rotor, that disintegrates with age. The rubber filings fell all over the Cam Shaft sensor code wheel and caused my car not to start and stall. Buy a new distributor!