Light Rays At A Boundary:
The qualitative illustration of refraction is shown in figure below, where the refractive index of the first (i.e., lower) medium is higher than that of the second (i.e., upper) medium. A ray hitting the boundary at a right angle (i.e., angle of incidence is equivalent to 0°) passes via without changing the direction. Though, a ray which hits at some other angle is bent; the bigger the angle of incidence, the sharper is the turn the beam obtains. Whenever the angle of incidence reaches a certain critical angle, then light ray is not refracted at the boundary though rather is reflected back into the first medium. This is termed as total internal reflection.
Figure: Rays of light are bent more or less as they cross a boundary among media containing various properties.
The ray initiating in the second (i.e., upper) medium and hitting the boundary at a grazing angle is bent downward. This causes deformation of land-scape images whenever viewed from underwater. You have view this effect when you are a scuba diver. The trees, sky, hills, buildings, people, and the whole thing else can be viewed within a circle of light which distorts the scene such as a wide-angle lens.
When the refracting boundary is not flat, the principle shown by figure below still exerts for each ray of light hitting the boundary at any particular point. The refraction is considered by respect to a flat plane passing via the point and tangent to the boundary at that point. Whenever many parallel rays of light strike a curved or uneven refractive boundary at many various points, each ray follows the similar principle separately.