Sounds like the world famous IAC valve.
Remove it and give it a clean with carb cleaner make sure the piston moves easily and put it back together. If that does not cure your problem then it is time to replace it.
You can also clean your MAF sensor while you are under the hood this can help also.
A forum community dedicated to Ford Mustang owners and enthusiasts. Come join the discussion about performance, production numbers, VIN decoders, modifications, troubleshooting, power adders, DIY tutorials, and more!