Before you understand the reason behind this phenomenon, you need to know the composition of milk. Milk is a colloidal solution composed of Water, Fats, Proteins, Lactose, Minerals. Proteins, Lactose and Minerals are together present as Milk Solids in the milk. Proteins present in milk are Casein and Whey. In cow milk, the composition is Casein - 80% & Whey Protein - 20%. Strange fact is that in human milk the composition is just opposite, it contains Casein - 30% & Whey Protein - 70%.
Whey is a mixture of these three proteins - Beta-Lactoglobulin, Alpha-Lactalbumin and Bovine Serum Albumin. Now as you learn about the composition of the liquid, we can go to the next step where we heat and then cool it to understand the changes in protein structures.
In a protein molecule, the hydrogen atoms of the amino acids exhibit attractive force on the atoms of neighbour amino acids (of the same protein). They form a weak bond called Hydrogen Bond. These forces are present inside a single molecule of protein, so these are Intramolecular Forces.
Due to these intramolecular forces between the amino acids of the protein, it folds and becomes an independent entity.
When heating this protein, those weak hydrogen bonds between amino acids break and the protein structure is unfolded. We call this Denaturation of Proteins. On further heating when heat energy exceeds the Bond formation enthalpy, each protein starts forming bonds with other protein chains present around. This network of protein coagulates the fat molecules and holds them inside it and then it rises to the top of milk.
On reaching the surface, water from this protein-network evaporated. This, in turn, solidifies the network and creates a layer on the surface of the milk. We call this as the Milk Skin or Lactoderm. The skin formation is visible when the heated milk is kept for cooling. This makes a common misconception among people that Milk Skin forms when heated milk is cooled. In reality, Lactoderm formation starts while heating itself.
But sadly this phenomenon also causes a common disaster - spilling of milk. So always stay sharp and don't leave your milk alone while boiling on the oven.