The Water will not go anywhere, In real the design consists of Inlet Valves and outlet valves incorporating fluid direction control valves and flow control valves. in which the fluid when entered from right, pushes the piston until the end, that makes the small end piston also to move pushing the prefilled fluid residing at the right end side of the cylinder. alternatively  to and fro motion is experienced by the piston giving the Pressure difference.