Here's what you should do:
1. Get the diagnostic trouble code (DTC): You need to find out *why* the light is on. The easiest way is to use an OBD-II code reader. These are inexpensive and readily available at auto parts stores. Plug it into the OBD-II port (usually under the dashboard) and it will retrieve the DTCs. This code is crucial in diagnosing the problem.
2. Research the code: Once you have the code(s), look them up online (many websites offer free DTC lookups). This will give you an idea of the potential problem.
3. Attempt repairs (if able): Some simple issues, like a loose gas cap, can be easily fixed. Tighten the gas cap and see if the light goes off after driving for a short while. If it's a more complex issue, consult a repair manual or a qualified mechanic.
4. Clear the code (after repair): *Only* after you've addressed the problem that caused the CEL to illuminate, you can clear the code. Most OBD-II code readers have a function to clear codes. The light will stay off if the repair was successful. If the light comes back on, the problem wasn't fully resolved.
Do NOT simply disconnect the battery to reset the light. While this might temporarily turn off the light, it won't fix the underlying issue and could erase important data needed for proper diagnosis.
In short: Fix the problem, then clear the code. Ignoring the light is strongly discouraged.