Hi XXXXXX,
It sounds like your IAC (idle air control) motor is stuck wide open, or you have a severe vacuum leak causing this stalling problem. If there was no check engine light on prior to this, there may be a code set in there now seeing that it won't stay running. We need to check for codes and that could help us even further.
Thanks,
Ron
ASE Certified Technician
34 years experience in driveability for domestics and imports, also a professional Instructor