Watch this video and learn how a piston pump works, here we have dismantled a piston pump. So you can clearly see all the components like the cylinder block, pistons, drive shaft, swash plate etc. This is actually the piston pump of a swing motor used on tracked excavator machine.
Piston pumps are axial flow variable displacement pumps. The flow can be varied using this type of pumps. The swash plate plays the key role in varying the flow. When the swash plate is vertical there won't be any flow and if the angle increases the flow increases and as it decreases the flow also decreases.
We have added the annotation showing the animation of piston pump, so click it to watch the working animation.