First eliminate all vacuum or air leaks in the system. You may have a bad IAC ( idle air control) but try cleaning the throttle body first. Remove the intake snorkel, have someone hold the throttle wide open for you and scrub the back side of the throttle plate and surrounding bore with an old tooth brush and some carb cleaner. Be sure to spray some into the small holes next to the throttle plate. That should help stabilize the idle. If it still has a problem, replace the IAC.