If your vehicle is showing idle speed fluctuates up and down rapidly, here are the most likely causes and the parts you'll need to fix each one.
Unmetered air entering the engine bypasses the sensors, causing the engine computer to constantly overcorrect fuel trims to stabilize the idle. This is frequently caused by a disconnected or cracked vacuum hose after recent under-hood work.
The IAC valve regulates the air bypassing the throttle plate when your foot is off the pedal. If it becomes clogged with carbon or the internal motor fails, it will stick and cause the idle to hunt up and down.
Over time, carbon and oil sludge build up around the throttle plate, preventing it from closing completely or smoothly. The engine computer struggles to find a steady baseline for idle airflow.
The MAF sensor measures the volume of air entering the engine. If the sensor wire is dirty (often from over-oiled aftermarket air filters), it sends erratic signals to the computer, resulting in a surging idle.
The engine computer uses coolant temperature to determine idle speed (higher when cold, lower when warm). If the sensor fails and sends rapidly fluctuating temperature readings, the computer will constantly switch between cold and warm idle targets.
The EGR valve recirculates exhaust gases to reduce emissions, but it should be closed at idle. If carbon buildup causes it to stick open slightly, it acts like a massive vacuum leak and chokes the engine, causing a rough, surging idle.