oil pressure switch, or an oil pressure gauge sender?
I think its an oil pressure gauge sender, for an aftermarket guage (like VDO) rather than just having the low pressure warning light.
Instead of having a thin oil line connecting the sender to the guage, this is electronic version:so one terminal will be connected to 12V, and the other (possibly centre terminal) would be the signal going to the back of the gauge.
If you don't have one, it's a good thing to fit, good to know your oil pressure.
Usually you need the correct gauge and sender as a kit.