Hello and thank you for choosing Just Answer.
I would suggest that you start off with the baiscs prior to changing parts.
First I would suggest that you clean you throttle body. Make sure it's closing all the way shut when the gas is not pressed.
Secondly I recommend that you look for vacuum leaks around the intake manifold and throttle body gaskets. You can do this by turning on the car and then spraying some carb cleaner around the gaskets. If the car's operation changes (RPMS go up) that means you have a leak.
Finally, if none of the above have worked. You need to check out your Idle Air Control Valve. This vavle operats the cars idle. When the car is idling (Throttle body close) the valve lets in a little air to allow the car to remain on. If this valve is clogged/ dirty or defective your cars idle will race up and down.