A hydraulic arm works by using high fluid pressure, created by a pump, to force a piston in a cylinder to move. As a valve is opened one way, the fluid is allowed to enter the cylinder and force the piston to move.
An example of a typical hydraulic system would be a three-way valve operated by a lever. In the central position, the valve is closed. In the forward position, the valve is open, allowing the fluid to flow and push against the bottom of the piston and forcing it to extend. In the rear position, the valve opens to allow the fluid to flow in the opposite direction, making the piston contract. Oil is generally used because of its lubricating and anticorrosive features, but water could be used as an alternative.