why does my engine somtimes race? on 1998 Ford Escort

somtimes my engine will start to race after it has warmed up.It has done this twice
in the last couple of weeks.I tried stepping onthe gas pedal but that did not stop it so I turned off the engine and started it back up and it idle normally.

Asked by for the 1998 Ford Escort
What engine?
Light on? Sounds like an idle air control problem, pcv system on this motor gives some trouble also.
no the light is not on