This trick called “Bending the light” demonstrates both refraction and reflection, it also shows a phenomenon called total internal reflection.
The light bends that way because of something called total internal reflection. That happens when light moves from a more dense medium (water) to a less dense medium (refraction) and the angle of incidence is bigger than the critical angle. In that case, the light is trapped inside the water (more dense medium) and cannot reach air (less dense medium), the light starts to bounce inside the water over and over again. Some examples in real life of total internal reflection are optic fibres and water jets.