Hello and thank you for choosing Just Answer.
The engine warning light comes on to show that the computer has stored a faulty code. You will need to perform an OBDII scan to find out what the computer has stored. Take the car to Autozone and ask them for an OBDII scan, they will do this at no charge.
An OBDII scan will tell you why the light has come on, what needs to be repaired/replace fix the problem. Once you have repaired/replaced the problem, simply take the car back to autozone and ask them to reset the light (turn it off), or disconnect the battery and leave it disconnected for 5 mins. This will reset the computer and ease stored codes.
If the car is running normally and is not losing power or hesitating, chances are you just need a new fuel cap or oxygen sensor.