Please refer to the figure above.
#ABC# is a cross-section of a triangular block of transparent material. Usually it is in the form of an isosceles triangle. Triangular block is called Prism.
A ray of light #PQ# is incident on one of its faces at point #E#, making an #angle PEN#, also called the angle of incidence #angle i#, at the point of incidence. #N N'# being the normal at the point of incidence.
As the ray of light enters the transparent material, it moves from air, a rarer medium, to a denser medium. Refractive index #mu# of the material of the block being more than that of air. The ray of light is refracted and bends towards the normal.
The ray of light moves in a straight path through the block and impinges the other face of the block at #F#. As it emerges out of the block, it moves from a denser to a rarer medium, and therefore, bends away from the normal #MM'# at point #F#. Once out of the block it proceeds again along a straight line path #RS# as the emergent ray.
In the ray diagram angle of emergence and the angle of deviation are also depicted.