Basics: there's a little pump connected to the engine, it's a positive displacement pump, it's going to pump oil no matter what. The higher the engine RPMs, the more oil it pumps and the higher the oil pressure becomes.
There's a little spring loaded relief valve to keep the oil pressure from getting too high. At some point, when the oil pressure is high enough, the pressure relief valve starts to open and dump the excess oil back into the pan. This keeps bad things that can happen with too much oil pressure, from happening.
All this oil pressure is filling little passages (they're like tubes formed in the engine block casting). The little passages connect to the various bearings for the crankshaft and cam shaft. The whole point is to pump oil between the journals and bearings so no metal-to-metal contact occurs. As the oil sprays out from the bearings, it lubricates other things, like the cylinder walls and cam lobes. Then it goes back to the sump.
Oh yeah, there's an oil filter in there somewhere.
As the bearings wear, they become "sloppy", the oil sprays out from them more easily. The oil pressure can not build-up like it can on a nice, tight, new engine. If the engine is old enough, and tired enough, I suspect the pressure relief valve will never even open. If the engine is old enough, and tired enough, like your buddies' car back in high school, the oil pressure light may occasionally flicker on at idle, 'cause the oil's "leaking" out of the bearings faster than the oil pump can pump it in. "Hey, your oil light's flickering"... "Um, yeah... it does that."