The check engine light is a warning light that warns you of any number of problems, depending on your vehicle that light can come on due to ABS problems, Traction control problems, 4wd problems, etc. With new model vehicles, these items may have their own light. When the check engine light (or service engine soon light) comes on the main computer has stored a code that indicates the type of problem that has been detected. The code is not giving a definitive part failure, but more of a general type of problem. Don't be fooled into thinking you can just read the code and install a new part!
It takes a trained technician to interpret scan data and test the right components. Having an automobile parts store read the code will likely lead to you purchasing and replacing a lot of unneeded parts and that can cost more than the needed repair itself.