Your car’s engine, like nearly every other engine build on the principles of the internal combustion engines needs motor oil to lubricate, cool and clean the engine’s internal mechanisms. Motor oil is so critical to the workings of the engine that without it you would very quickly have a piece of scrap on your hands, good for nothing except being melted down. In a nutshell it’s the job of the oil warning light, or the oil pressure gauge as you will find in some cars, to let the driver know when the pressure of the motor oil is getting too low to allow it to do its job. It should be noted that it is a warning about oil pressure not about the amount of oil in your engine but because the oil pressure will fall when the volume of oil falls too they can be considered the same for our purposes. Some cars have an oil pressure gauge specifically to let the drive see the actual pressure. These are fitted mostly to high performance cars and are not needed to 99.9% of motorist who only need to know when the oil pressure is too low.
To stop the warning light from coming on check the level of motor oil on a monthly basis. If you drive a lot of miles or have a car that burns through oil quickly you should check it more frequently. You should not just keep driving until the light comes on and then check the oil level. The warning light is controlled by an engine oil pressure sensor and if this switch is faulty the light might not even come on. It’s a very bad idea to drive a car on low oil levels even if they are not quite low enough to trigger the warning light. The best thing to do is keep the oil near the full mark as indicated by the dipstick, and keep your oil change equipment handy if you are the type to change the oil your self.