distributor cab on 1996 Mazda 626

i was driving to work when my car suddently stopped on the road. i when to a repair shop and i was told is the distributor cap.

Asked by for the 1996 Mazda 626
It's possible that the distributor cap failed. But the first thing I think of is that the Camshaft Position Sensor (CMP) inside the distributor failed. If that's what they end up diagnosing, it'll need a rebuilt distributor which is an easy job, worth about an hour labor to fix and maybe $300 for the part. These cars with the 2.0L engine commonly have CMP failure and any Mazda guy should be aware of that. A guy who doesn't know Mazdas may not diagnose this so easily.
Here's a directory link for you: