The most common cause of this is a sticking or binding IAC. I would recomend cleaning the throttle body and the IAC (idle air control valve) before anything else. If the IAC is actually binding it may need to be replaced rather than just getting cleaned.