Sounds like the mass airflow sensor. Generally when the check engine light comes on, there is either an issue w/ the sensor or electrical. Go to a Napa or similar store and they can put it on their PC (usually for free) and tell you what it is. If it is something they sell there, most sensors are a quick fix and they will usually come out and install it for you.
Let us know what the diagnosis is.