This is a bit more complicated than it seems. Milk contains about 3% protein. Most proteins are not soluble -- otherwise our bodies would dissolve when it rained! The most common type that are soluble are the albumins, which rely on their tertiary structure for solubility. Hence anything that disrupts the tertiary structure -- denatures it -- can expose hydrophobic parts of the chain, causing them to agglomerate and form a solid precipitate. In the case of milk, this process is called "curdling" and the soft solid is called "curds." It is perfectly safe to eat, in fact quite nutritious. It is the first step in making cheese, and in any case happens as soon as the milk hits your stomach acids.
Now, typical things that cause albumins to denature include heat, acidity, and concentrated salts. So, soft drinks are usually quite acidic, they cause curdling, problem solved. Hmm, almost. Actually the main protein in milk is casein, and casein is not an albumin. Its method of maintaining suspension in milk is much more complex: the casein micelle. If you are familiar with the micelles formed by detergent: these are different. They share the name because they look similar at high magnification, but definitely don't work the same way. In fact the question of how casein remains suspended in milk is an open research topic. Suffice to say, your denaturant (acid, in this case) denatures something, this disrupts the casein micelles, and they agglomerate to form delicious, nutritious, slightly not-good-looking curds.