Basically an engine has multiple sensors and devices, and the car too has various sensors and devices.

If something seems not right to the cars computer/ECU, then it will show you the engine light.

You can then connect a reader (which you can get off ebay for $15 and bluetooth connect it to your phone with an app such as TORQUE), and it will give you the error code/s.

That code will correspond to a sensor or device that your ECU thinks is faulty. Then you can replace or fix it.

My guess would be that it is one of your oxygen sensors.