If it runs fine so long as you are stepping on the gas a little, odds are that your idle air control module is simply dirty. Which does not mean it needs to be replaced. Spraying an aerosol Throttle Body Cleaner into the throttle body while the engine is idling will usually clean it and restore it to good operating condition.
Use a phillips head screwdriver to loosen the clamp that holds the air intake tube onto the top of the throttle body then lift the tube up & off the TB. Have a helper start the engine and try to keep the engine idling which is the only rpm the IAC will pull the cleaner in through itself. The cleaner will bypass the IAC if the rpms are raised up above idle rpms and won't be able to clean the IAC. If the engine dies after spraying the cleaner in at idle rpms, that's normal... just restart the engine and do it again. You want to get at least 1/3 of the can of cleaner through the throttle body while the engine is idling.
One more thing it can be... a nearly dead battery.
P.S. I see a link to cleaning the IAC was provided above. That works well but in my experience it is seldom required to actually remove the IAC to clean it. Plus by spraying the cleaner into the throttle body while the engine is running at idle rpms, you're also cleaning the orifice in the throttle body that the IAC's plunger works inside of... a key part of cleaning the IAC and the area it fits into.