First and foremost, check the oil level.
Once you have established that there is the required amount of oil in the sump, you should do an oil pressure test.
This will require you to buy, beg, borrow, bludge, hire or steal a diagnostic oil pressure test gauge:
On a warmed up engine, you remove the oil pressure switch from the engine and replace it with the hose of the gauge. (and adapter if required)
Then start the engine, give the throttle a blip to make sure the oil is circulating, let the engine drop back to idle and take a reading from the gauge.
Idle oil pressure should be between 1.7 bar (24.6 psi) to 3.5 bar (50.7 psi)
The maximum oil pressure below 40˚C @ 6500 RPM is 7.0 bar (101.4 psi)
The oil pressure switch opens at 0.3 bar (4.3 psi ) to 0.5 bar (7.2 psi)
Once your satisfied that your engine is generating sufficient oil pressure, you can then safely assume the problem is the oil pressure switch itself and replace it.
Low oil pressure could indicate a whole lot of problems (none of them good) such as:
*Worn conrod and main bearings, possibly crankshaft journals too.
*Worn oil pump.
*Damage to or restrictions in oil pick up and tube.
* Too light a grade of oil used for the conditions.
* Insufficant oil in the sump, causing air to be picked up.
* Excessive oil in the sump, casuing the oil to become aerated.
* A blocked oil filter can also be the cause.