This can be one of the scariest lights that pops up on the dash of your car. It doesn't have to be, but it also should NOT be ignored. Below are some easy ways to take care of this immediately without spending a bunch of money or creating anxiety over doing nothing.
A check engine light means that one of the car's computers has detected a malfunction that is detrimental to the car or the environment. IF A CHECK ENGINE LIGHT IS FLASHING DO NOT DRIVE YOUR CAR. A flashing check engine light could be a fire hazard and should be towed to your mechanic.
What to do when a check engine light comes on:
IF A CHECK ENGINE LIGHT IS FLASHING DO NOT DRIVE YOUR CAR. (worth repeating)
Make sure that your gas cap is tight. The gas cap pressurizes the evaporative emissions system. With a bad cap or a leaking seal, the system does not function correctly.
Go to your nearest auto parts store and ask if they will read the code for free. Auto shops will generally charge you for this. A "code" is diagnostic information stored by your car's computer which relates to the system that is experiencing an issue (or the system that is being affected by the failure). Once you have this code, you can Google, your car and the code and gain the knowledge surrounding what might be going on with your vehicle.
If there are simple things you can attempt yourself (like tightening your gas cap) please do them. If the problem is corrected, the check engine light will go off the next time the car does its automatic check on that system.
You can purchase an OBDII code reader for less than $20 to be able to read the code yourself. This would also give you the option to turn off the code. Computers in cars are just like any other computer, many times, they just need to be turned off and back on. If the problem persists then the check engine light will turn back on.
If you are close to needing a smog done, it can be better to have a professional look at your vehicle. The computer stores information for the smog that if you erase a code, this smog information would also be deleted. In order to be ready for a smog, you may have to drive the car a couple hundred miles for the vehicle to be ready. A mechanic should be able to perform a drive cycle for your specific vehicle in order to help get it smog ready faster.
Don't add stress to your life about what is going on with your car. Instead, empower yourself and find out. Solving something quickly could prevent costly repairs later. Knowledge is power!