Your car may have an Engine Control Unit (ECU), which is basically a computer that monitors components of the vehicle and is able to identify if there’s an issue. It lets you know about any issues through a light system on your dashboard. So, when you start your ignition, you notice them light up and usually once you set off they go off. If they don’t, or if a light comes on unexpectedly while you’re driving, your ECU is trying to tell you something.
As a rule, the sooner you get your vehicle to us for engine diagnostics, the better. Driving with any unexpected warning light illuminated could really damage your engine.