Ok, if it is idling up and down rhythmically, then the idle air control valve is faulty and needs to be replaced- it is bolted to the top of the throttle body(see attached)
If it is idling erratically, then there is an air intake or vacuum leak that will need to be traced and repaired. Use carb cleaner and with engine idling, spray the air intake tube, then pcv valve hose, then each vacuum hose one at a time, and then base of intake. If idle smooths out when one is sprayed, that is the culprit and needs to be replaced
Please remember to rate service using the rating page so that I may receive credit. Thanks
If for any reason, you can't rate my answer OKAY, GOOD, or EXCELLENT today.
Please reply and let me know why, so I can help more/better.
All follow up responses are FREE, after completing the required rating