The pump gets all its oil from the tank, and all oil is returned to the tank. Open system. A closed loop system will have oil being returned to the pump with a bleed off oil being returned to the tank via a filter, and a charge pump to make up for the lost oil.
Closed loop works great for constant volume systems, such as running motors, hydrostatic drive systems. Not so good for systems that change volume, such as cylinders. When both situations are needed, there is usually a open loop gear pump on the back of the closed loop piston pump.