Why does my engine stop while driving?

Does it crank (the motor turns with the starter) but not start? If that is the case, it sounds like a classic ignition system problem. Car gets hot, ignition component stops working when hot, car cools down, and will now re-start.

When the car stops, you need to try spraying some starter fluid into the engine when you try and start it. If it fires up, it is a fuel problem. If it doesn’t, check to see if there is spark. If this is already too deep for you, you need a better mechanic and time to leave the car with them to sort out the reason why it stops.