In automotive engines which need oil for lubrication and other uses, an oil pump is required to keep oil flowing throughout the internal components. Some pumps are mechanical, while others are electronic.
Mechanical Oil Pumps
Most engine oil pumps are mechanical, using the rotational force the engine is already creating to spin a pump. Since its speed is directly linked to the speed of the engine, as the engine spins faster, the pump moves a greater volume of oil.
The engine oil pump shown to the right is a design used on many GM LS series engines. You mostly just see the aluminum shell of the component with the working parts inside. The hole in the middle has a driven splined component which is spun to generate the pumping action inside.
Electric Oil Pumps
Some oil pumps are driven electronically. Many modern vehicles use them since they can send oil to the top of the engine before it is cranked over (which is why some owners manuals recommend waiting a few seconds after turning the key to the "on" position before starting the vehicle's engine). An electronic oil pump can be controlled to supply the right amount of oil for the situation.
Automatic Transmission Oil Pump
Automatic transmissions use oil pumps as well, to move ATF to the components that need the fluid and/or pressure. A variable vane pump can regulate pressure by varying its internal shape, but vane and gerotor pumps will have a pressure regulator that dumps excess fluid to maintain a consistent pressure. That consistent pressure not only protects gaskets from high pressures, but also makes shifting consistent.
Inside a Gerotor Pump
The Gerotor pump above is out of a Ford automatic transmission.