There are many different reasons that your check engine light might come on in your vehicle. The most common are the O2 sensors. Depending on your engine, your vehicle has multiple. The front O2 sensors sit very close to the engine and are connected by wires to the exhaust system. The rear O2 sensors sit underneath the car very close to the catalytic converter. A problem in any sensor is enough to turn your check engine light on.
Some people do not get the problem checked leading to even more problems...