When a vehicles check engine light comes on it is telling you something is wrong with either the engines electrical system or it could be as simple as a loose or bad gas cap.
Either way when the check engine light comes on you should have the codes pulled to find out what is actually going on with the car.
The check engine light can come on for things such as bad spark plugs, bad ignition coils, clogged fuel injectors, bad spark plug wires, bad ignition module and even like I mentioned before a loose or bad gas cap.
Check to make sure your gas cap is on tight if your vehicle has a gas cap.
You can take the vehicle to Autozone to test why the check engine light is coming on and they will test the check engine light for free.
If you need a better diagnostic you can take it to a mechanic who will use some more expensive equipment to test and diagnose the problems with your car and they can even shut the check engine light off for you.
They might charge to do a diagnostic like I do.
I charge $20.00 for a diagnostic of the cars computer using my test equipment.