The ray diagram is a tool to help you visualise the path of a ray (eg. light). The convention is to draw lines perpendicular to the ray's direction of travel, where the lines are spaced according to the ray's wavelength. A line with an arrow indicates the direction of travel.
It can help you see what happens when a ray passes through a transparent prism (or indeed, other stuff): eg. the part of the ray that reaches the prism's surface first will be refracted first, so by using the ray diagram you could see the gradual change in the entirety of the ray's direction of travel.