The oil pump on most engines is located inside the oil pan and mounted to the engine.
The oil pump has a screen that sits in the oil pan to pick up the engine oil and then send it through the engine and through the crankshaft to lubricate the bearings and the rest of the engine.
To change the oil pump on an engine you need to drain the engine oil and drop the oil pan and then remove the oil pump.
It can be a time consuming job and you must also prime the engine oil pump first before starting the engine otherwise the engine won't get oil pressure.
Some engine oil pumps are self priming while some others are not.
You can prime the engine oil pump by pouring some engine oil into the oil pump and then use a screwdriver or special tool to spin the oil pump and prime the oil pump and then it should start pumping the oil.
Having a shop change the oil pump could cost you from $150.00 to $400.00 depending on how hard it is to get to the oil pump and the cost of the oil pump.
I have a truck that I can get the oil pump for only $25.00 and I can replace it myself and the one on my car costs $50.00.
Oil pumps should last the life of the vehicle but sometimes they do fail and if I had the oil pan off anyway then I'd replace the oil pump because it's right there and pretty cheap to replace.
I'd also replace at least the rod bearings while the oil pan was off just to prevent bearing failure which can seize your engine.