It is a reaction of the Phosphoric Acid contained in the coca cola to the milk. Milk contains the protein Casein, when mixed with an acid the protein binds causing it to curdle. You will have the same effect when adding milk to anything acidic like lemons, vinegar, grapefruit etc.
Phosphoric Acid molecules attach to the milk giving them more density and separate out while the remaining liquid that makes up the milk and cocoa cola now being lighter floats on top. The solid matter is basically milk that has been curdled by the addition of more acidic soda.
Both items are acidic but coca-cola more than milk. In general, coca-cola has a pH of anywhere from 2.5-4.5 because of the Phosphoric Acid content where milk has a normal pH around 6.7