Katheros if your check engine light is on then your computer is storing a code. The code in the computers memory is either the issue you are having or related to the issue you are having.
Typically the CEL illuminates when an emissions sensor is out of range, such as an oxygen sensor, or EGR sensor.
Replacing the spark plugs will not solve your issue here, what you need to do is perform the KOER and KOEO tests (key on engine running, and key on engine off) and pull the codes from your computers memory.
You can do a search for how to go about this, autozone can pull the codes for you for free 90% of the time.