Milk is a common ingredient in soups, sauces and other hot dishes, and usually it can be cooked without any ill effects. That isn't necessarily true for milk at a full boil, which often gives the cook an unpleasant surprise by curdling. This fills the dish with grainy lumps of milk protein, usually ruining its texture and appearance. Several factors can cause milk to curdle as it cooks, but most can be avoided.
How Curdling Works
From a scientific perspective, milk isn't a single substance. It's actually a complex mixture of dissimilar ingredients, held together in a reasonably stable suspension. Most of its volume is taken up by water, but it also includes large quantities of fat, minerals, sugars, casein proteins and whey proteins. When seen under a microscope, the casein proteins resemble tiny pompoms with a large number of thin tendrils sticking out in all directions. Ordinarily, they have an electrical charge that makes them repel one another. But if an outside factor changes that charge, they cling together and form larger masses, or curds.
One factor that can change the charge of the casein proteins is acidity. This occurs naturally over time, as yeasts and bacteria in the milk consume its sugars and convert them into mild lactic acid. Eventually, the milk becomes acidic and develops a sour smell, and the casein proteins clump together in large curds. The effect of acidity on the milk proteins is accentuated by heat, which is often why your milk curdles when heated. Although it still smells and tastes fine, there's enough natural acidity in the milk to curdle the proteins when it's brought to a boil.
The same effect can be caused by acidic ingredients in your recipe. For example, you might add lemon zest or lemon slices to a baked fish dish in a milk-based sauce. As the sauce approaches a boiling temperature in the oven, the lemon's acidity often causes the milk to curdle. The same is true of custards, such as pie fillings or a cooked milk-and-cream mixture intended for your ice cream freezer.
Many foods naturally contain tannins, the substances used to turn animal skins into leather. They lend a pleasantly astringent and sometimes bitter edge to the flavor of many foods and beverages, from coffee and tea to common cooking ingredients such as red wine and potatoes. Boiling dishes containing any of those ingredients -- especially wine, which is also acidic -- can cause your milk to curdle.
An Ounce of Prevention
In most cases, a bit of forethought can minimize your risk of curdled milk. One quick test is to heat a small quantity of milk, poured into a heatproof measuring cup, to a boil in your microwave oven. If it's acidic enough to curdle on its own, you'll see fine grains of protein in the milk. Reserve this milk for baking or other uses, and buy fresher milk for your cooking. If your recipe calls for acidic ingredients such as tomato or lemon, add those to the milk -- or vice versa -- at the last possible moment. Finally, once the milk has been added, reduce your heat. A gentle simmer still cooks your food but is less likely to curdle the milk.