(a) When a light ray travels from air into water, it's speed decreases. So, it bends towards the normal to the interface between the water and the air.
(b) When a light ray travels from water into the air, it's speed increases. So, it bends away from the normal to the interface between the water and the air.