A Hydraulic Ram is a pump that converts kinetic energy into potential energy using the flow of a creek to lift the water higher than its original source. A waste water valve (the spraying thing in the video) frequently closes under the pressure of the flowing water coming through the inlet pipe (the metal tube in the video). This causes an overpressure in the pump, the so called water hammer effect. Under the overpressure a second valve, the so called check valve, opens and the water is pumped into the outlet pipe (the plastic tube). When the pressure decreases, the check valve closes, the waste water valve opens, the pressure of the flowing water can build up again and a new cycle begins. The metal cylinder is filled with air and works like a cushion to lower the stress of the water hammer effect on the parts of the pump.
This device does not need any external energy source. The result is a small but constantly flowing stream at the upper part of the outlet pipe.