Why does electromagnetic refraction happen? Why does refraction happen? In high school textbooks, it is stated that it happens because the speed that electromagnetic waves propagate in the media change. But why cant they continue propagating in the same direction with a different speed?
 A: A nice analogy that will hopefully help you to understand this, is to imagine the wavefront as a marching band. They all walk shoulder to shoulder, and the line is one person thick. Imagine the air as land they walk over, and the material as a beach. Their walking speed on firm soil is faster than on the beach sand. When they approach the beach under an angle, one of the members will hit the sandy soil first, and will go slower then the rest. Since the others keep on going at their normal speed, their direction has changed as soon as the entire band is on the beach. 
I is also like a car, of which the (say) left tire hits some soil over which the tires go slower before the other tires...
A: See in Wikipedia the topic "Phase velocity"
http://en.wikipedia.org/wiki/Phase_velocity .
When the light passes from a less refractive medium to one more refractive one, e.g. from air into water, the phase velocity is changed without changing its frequency. 
In short, consider a plane wave hitting the water surface. Let's think for simplicity in two dimensions (2D).
Consider in this wave a plane of constant phase - in 2D it is a straight line perpendicular to the propagation direction). This makes some angle θ_i with the normal to the water surface.
Let A and B be two points on this straight line, A closer to the surface, B more distant.
First A reaches the water surface, later B.
When B reaches the water surface, A is in the water already for an interval of time τ. The straight line that unites the point A with the point B represents in 2 dimensions the plane of constant phase in water. But in the water, the point A reached during the time τ a shorter distance from the water surface than it would have reached in air.
Therefore, the normal to this line makes a smaller angle, θ_r, with the normal to the water surface, θ_r < θ_i .
