What causes a car to shut off while driving? About 10-15 later it will start back up; however the check engine light comes on. If you try to start it before 10-15 min it turns but wont catch. It was only doing it a few times, now its happening more frequently and before it turned back on almost immediately.
The first thing you need to figure out is the check engine light code. You'll need to hook up your OBD2 scanner and get the code it'll be most likely a code like "Pxxx". Once you get that you can begin diagnosis. We also need to have the year make and model of your vehicle to give a good over the internet idea of what's going on.
You can goto your local parts store and they will do it for free. I wouldn't take any advice from them because they will just try to sell you a bunch of parts, and they aren't usually ASE certified techs that really know how to diagnose a vehicle.
If it's a Dodge, they are notorious for this issue because they put the ECM's in the engine bay and fender well. Mostly all Chrysler vehicles have some ECM issues.
This is all the information i can give you right now, update your answer with the information I requested and we can go from there.