Just so we can be sure we're all talking about the same indicator, which light is it? use this diagram for reference . . .
The "oil light" (21) flashing red indicates low oil *pressure* and is usually accompanied by three beeps. Continuing to drive, or even run the engine, risks expensive damage.
Causes of low oil pressure include low oil level (but I expect you've checked that already, I would have), blocked oil pickup pipe, failed oil pump or faulty pressure sensor. A blocked oil filter might also cause this, as eventually a valve will open to bypass the filter.
If the oil and filter were changed at the last service interval, then I'd look at the oil pickup first. You have to drop the sump and lose all the oil to do this, but it is fairly common for the mesh strainer on the bottom of the pipe to get clogged.
Apparently this mostly happens if the sump has been removed and replaced by someone who was too generous with the sealer that is used in place of a gasket. This leads to lots of blobs of sealant squeezed out of the joint, which then drop off into the sump and get caught in the strainer.
The oil pump is checked by connecting a pressure gauge to the engine oilways and checking the pressure. It is not a common failure.
The same check will detect a faulty pressure sensor. If they are cheap enough, replacing it may be a quick way to eliminate this as the source of the fault without going to a garage. But I'd check the pickup pipe first.
If it's flashing yellow (or amber) then it's indicating low oil level. If your oil level is good, then the sensor in the bottom of the sump has gone faulty