What should you do when your check engine light comes on? At this point the OBD (on-board diagnostics) in your car have logged a code providing information about the cause of the light coming on.
Once you're done, use what you found in reading about the code on the internet to decide whether to see a shop or not, and what to ask them to do. Or, if you're fairly sure that you're not going to learn anything new, you might just want to reset the light to see if it comes back.
Get the code checked for free
Here you have two choices. You can do it yourself, or find someone to do it for you free. Some auto parts stores will read the code for free, as will some oil change places, and a few similar businesses. Virtually all places that work with cars have what is know as an OBD scan tool for doing this.
Make a few calls, because those that won't read it free often charge more than the cost of buying your own code reader! You can buy your own reader for as little as $40, but getting the code read can cost $50-90. Try searching for "scan tool obd" or similar if you want to buy your own. They're easy to use, and worth having. You can help friends get their code read once you have one.
Learn what the code means
Once you get the code, search the internet for that code to learn more. Many causes of the check engine light going on are not serious or harmful, yet many shops are trained to use any code as an excuse to sell you things you don't need.
Easily reset the check engine light yourself
Open the hood, remove only the positive terminal of the battery, wait 10-15 minutes, re-connect and the check engine light should be off. Some suggest making the disconnection for only 5-10 minutes, and turning on the headlights during that time. Some find even less time works. It depends on your vehicle.