When mine did that the "Check Engine" light also came on. I found it was the Oxygen Sensor.
If you car is between 45,000-65,000, or 90,000-110,000 or keeping adding 45,000 to one side and 65,000 to the other, then it is most likely the 02 sensor, they fail about every 45,000-65,000 miles.
They arent cheap mine was $180, plus $48.00 to scan the computer, then some $8 shop supply fee, but the guy did the labor for free, it only takes about 15 minutes.
If you dont get it fixed and it is that expect your gas mileage to decrease SHARPLY, I mean badly, they say you can lose to $150-$200 a year in gas, if you have a faulty O2sensor.