Why does the index of refraction change the direction of light? I've been studying in optics the macroscopic maxwell's equations, and how electromagnetic fields propagate through different mediums. Over there, the index of refraction appears, as a complex function that generally depends on $\omega$, with both refraction and absorption terms: $n_c=n+i\kappa$.
I understand how this affects the speed at which light propagates, both macro and microscopically, and how this affects to how light is absorbed when it transmits through the medium, but I don't get yet how this index changes the direction of light, producing dispersion. I mean, all time I'm seeing those effects as something that separates dispersive from non dispersive mediums and all that stuff, and I don't know how light is actually dispersed. As it's something that happens when changing medium, I guess it's an interface effect, and we haven't seen those effects yet, but I would like to know an explanation.
 A: Here is an analogy that I like to use: (even though it is not really a correct physical explanation)
Imagine that you are out riding your segway over some strange surfaces, that each have a number $n_i$ that controls the speed that a segway wheel travels over it according to the formula $v_i=v_0/n_i$. Now imagine that you cross a straight boundary between two surfaces at an angle. Because of the angle, one wheel will cross the boundary before the other. If $n_i$ is higher for the entered surface this wheel will go slower than the other until it too crosses the boundary, which will cause the segway to turn towards the normal of the boundary. Similarly, if $n_i$ is lower for the entered surface, the first wheel to enter will go faster, and the segway will turn from the normal.
If you do the calculations for the segway you will get the the same results as for the wavefront explanation (basically Snell's law), but I really like how this analogy works with your intuition.
A: The direction a wave travels is due to its self-interference.
This shows a series of wave fronts encountering an interface where the speed of propagation is slower:

EDIT for @Alec S: Suppose you have a pond of water, and you simultaneously drop in 100 stones, all in a line, 1 inch apart. What does the wave look like? It looks like a line, because the circular wave from each stone interferes with those from its neighbors, so you don't see a bunch of circular waves, you see a line wave.
That's what a planar wave in 3D is. As the wave propagates, it is acting like an infinite number of sources spread out on a plane.
The only place all those waves reinforce is in a plane, so the wave looks planar.
Otherwise it would be a mish-mash of spherical waves from all the points, all jumbled together.
When such a wave front encounters a medium where the waves travel slower, guess what?
The distance between succeeding wave fronts decreases, and the self-interference takes off in a new direction.
There is nothing about a wave that keeps it going in one direction, other than the pattern of its own self-interference.
ANOTHER way to look at it is in terms of time. The locus of points on the wave front, whether it is above or below the interface, are simultaneous.
A: Actually, people have answered the question you seem to have meant, rather than the question you've asked. When a change in index of refraction causes a change in the direction of a ray of light, this is refraction. 
It is not dispersion, and has nothing (immediately) to do with dispersive mediums. Dispersion (rays of different wavelengths being refracted at different angles) occurs when the medium involved has a different index of refraction, and different speed of light, for different wavelengths. Such a medium is called a dispersive medium, and in general all optical mediums are dispersive to a greater or lesser degree. The discovery that it is possible to make a lens out of two or more different materials whose different dispersions could be made to cancel (the achromatic lens) was a giant leap for optical instruments. Lister's microscope (1826) is a good example.
