Could be many things but one of the first things to try is cleaning the IAC* valve. As the name implies, this device is directly related to the car idling as it would if you’re sitting still. It usually sits on top the engine somewhere so is easily removed with a couple of bolts. Shake it to get the crud out and then clean it with some carburetor cleaner.
What is the engine speed when you’re in gear and sitting still, btw?
*Idle Air Control
Edit: here’s a link that would make trying to clean the IAC a relatively simple DIY project:
http://www.muscularmustangs.com/iac.php