The relation between the angle of incidence and the angle of refraction is known as Snell's Law.
Since the light travels with different speed in different media, the direction of the ray of light will change when it crosses the boundary between the two media. This phenomenon is called refraction and can be observed if one places a straw in a transparent glass half-filled with water. The straw will appear to be broken at the boundary between water and air.
The speed of light in a medium decreases by a factor of n, called the index of refraction of the medium. The Snell's Law states that the ratio of the sine of the angle of incidence to the sine of the angle of refraction equals the ratio of the index of refraction of the incident medium to the index of refraction of the refractive medium:
`sin(theta_i)/sin(theta_r) = n_r/n_i`
The angles of incidence and refraction here are the angles that the incident and refracted rays of light make with the normal to the boundary between the two media.