The heat from the flame vapourises the candle wax (which is invisible;
the visible trail is the smoke). When you blow the flame out there is still some incompletely combusted wax in the air. If the smokey trail is lit quickly enough the flame will follow the wax vapour back to the wick and relight it.
When light travels from air into water it shows down, changing its angle or direction. This is refraction. In this example when the arrow is moved a particular distance from the glass of water it appears to be reversed. When light goes through the glass of water it bends towards the centre known as the focal point. However on either side of the focal point everything appears to be reversed. The light is bent past each other, light that was on the right is on the left and light that was on the left is on the right, reversing the arrow.