Oil pressure (OP) switches come in different PSI ratings. I.e. they are rated to switch at lower or higher pressure. If the last person to replace the switch had put in one too high for your engine it might take higher RPMs to switch.
Oil pressure alarm switches usually are the normally closed (NC) type so there is a closed circuit that turns the alarm light/buzzer on when you turn the ignition switch on. The NC switch opens and breaks the circuit when the oil pressure gets high enough so the buzzer/light goes off. That is why it takes some engines a second or two to stop the buzzer. (Water temp and oil temp alarm switches in contrast are usually NO - they complete a circuit when the temperature gets too high.) As noted above, oil pressure gauges and water
temp gauges are not switches but variable resistors that change with the rise and fall of the temps.
The circuit for OP switches is usually to ground. I.e. the wire coming from the panel and ignition is the positive side to the light/alarm and the other wire from that light/alarm is the negative side and goes to the OP switch on the engine. The OP switch is usually grounded to the engine via the pipe and the engine is grounded/negative back to the battery
However, some switches may not ground to the engine because they are at the end of a flexible hose instead of a pipe or whatever. The switch would have to have two contacts then. One wire on the switch goes to the light/alarm and one goes to a good ground/negative so that there is a full circuit. You can buy both. You can even have a dual contact OP switch on there when you don't have to if it is already grounded to the motor
. You have to run a separate ground then with the other contact.
Switches can also be on the positive side but OP switches are not usually.
Testing an OP switch is simple with a ohmmeter or multimeter as noted by another poster. You set the meter to ohms in the lowest range. Put one lead on to a good ground or an unpainted part of the engine. Put the other lead on the switch connector. With the motor
not running you should get a buzz and either zero or some very low ohms reading. Anything but 0 or very low means the switch is closed and not working as a NO switch. Start the motor and the switch should be open when there is oil pressure and you should get no reading/buzz which is proper for an open circuit. If the switch is rated too high because the last replacement was wrong, it would be closed until the pressure got to its rated PSI and then it would open.
Oil pressure switches for this type of application are usually pretty low, e.g. 5 PSI or so. You can't tell by looking at it which it is although it might be marked on it. It is common for the oil pressure gauge sender to be teed with the oil pressure switch. Mine is. The oil gauge will tell you the exact pressure but the oil switch is to alert you to a catastrophic low oil pressure as a last resort.
If your switch is too hard to get to, you can put in a pipe or pipe/elbow to get it out to make it easier to get to in the future. You would still have to get in there to do that though in the first place. Mine was a son-of-a-gun to work on so I did that.
Hope this helps. BTW - engine circuits like this often have color-coded wires that are the same for many engines. Ironically, there isn't a specific color for the oil pressure switch but there is for the oil pressure sender to the gauge (light blue). But note that not sometimes the colors get changed or not followed. Here is one chart that you might save and have on your boat to use for troubleshooting other things, provided your boat uses this scheme: