According to the definition of refractive index of a medium, say glass, [itex]n_g[/itex]
we have that
[tex]n_g\eq \frac{c}{v}[/tex]
where c is the speed of light in vacuum and v is the speed of light in the glass, which is less than the speed of light in vacuum, that is light travels slower in an optical dense medium. The various colors of light are not slowed down by the same amount thought. Therefore we find that blue light is lowed down more than red light in glass. Therefore the refractive index is color dependent (it is different for the various colors of light, even for the same medium).
This phenomena is called dispersion. For wave phenomena we know that
[tex]v=\lambda' f[/tex]
What happens is that the frequency of the wave stays the same as it enters the glass, but its wavelength,[itex]\lambda'[/itex], is altered in the optical dense medium.