Yea, autozone has a codereader that they will use for free and tell you the problem. Right after I put the longtube headers on my truck I had to drive it with no o2 sensors and no cats to the exhaust shop to get it all welded up, so I was throwing codes left and right. After it was all welded up the light went away after taking off the battery cable for a while, except after driving it for a little bit it came back on. Seeing as I now had my o2 sensors and cats installed, I knew that it wasn't either of these so I took it to autozone and they handed me the reader and said "have fun" basically you just plug it into the OBD2 port under the dash (1996+ vehicles) and hit the power button on the scanner then hit scan and the little LCD shows you what errors you have and what they mean. In my case I was getting a P303, which on a GM vehicle means misfire in cylinder 3, so 15 minutes and a $1.69 sparkplug later I was free to go with no check engines and a good running truck

. PS on some codereaders there is a reset codes option, but I have been told that this works for some errors but not others, so your milage may vary. With something emmissions related such as a gas cap loose or broken o2 sensor, I'd imagine that you can safely reset the codes.
Oh yeah, one more important thing for anyone that doesn't know... You can usually safely drive short distances with a yellow check engine light on, at the cost of a little fuel economy, but if you ever get a red check engine light stop immediately. Yellow is emissions related stuff, and red is stuff like overheating, and oil pressure loss.