A car can stall for several reasons. Typically fuel or ignition related.
Were you able to start it back up?
Sometimes faulty crank position sensor will cause the engine to stall while driving.
Repair Safety Notice: This information is for general instructional purposes only. Vehicle repair can be dangerous. Verify all information, follow manufacturer service procedures, use proper tools and safety equipment, and consult a qualified repair shop when needed.