Refraction is the change in direction of a wave when it travels through a differently dense medium. Air has a refractive index of about 1.0003, and water has a refractive index of about 1.33 and so when the light travels from the pencil through the water into air it bends and therefore makes the pencil appear bent.
This demonstration requires only a trough or bowl of water and a pencil for a demonstration although some teachers may require a class set of this apparatus.
The bowl is filled with water to a depth of about 5cm and the pencil rests on the side of the bowl. The viewer can see the 'bent' pencil from a number of different angles.
The diagram (see Fig 1) shows the demonstration equipment and the viewer's eye. The darker coloured pencil is the actual pencil and the lighter coloured one is what the viewer sees.
The end of the pencil (point X) will appear at a point that seems much shallower than the actual end of the pencil. Point Y represents the 'apparent depth' of the water.
The reason the viewer 'sees' this bend is because the light rays bend as they leave the water and travel through air.
Another example of diffraction can be seen when using the 'ripple tank' equipment. This time the change in medium density occurs when waves travel from a deep to a shallow reservoir of water.