I just remember we learned that, but school is quite a time away. It must be something about the fat, the emulsion, I just can't remember how it works.
Partly the protein. When the water in the milk boils it forms bubbles. The viscosity of the milk, together with the foam stabilising properties of the protein in the milk, mean that the bubbles cannot escape, so the volume builds up and it boils over. Protein is excellent at stabilising foams. Fire extinguishers used to use gelatine as a foam agent, and many beers use protein extracts to stabilise the head.