Latte art comes down to two main components: The artistic skills of the barista and properly steamed milk. There's a lot of science that goes into the latter. According to an in-depth primer from UCLA, different types of milk require different amounts of steaming time. If milk is steamed for too long, it can scald, which "kills bacteria and denatures enzymes" — but can result in curdling. Over-steamed milk can also undergo the Maillard Reaction (this is what causes foods to brown when cooking) which causes dehydration and oxidation reactions in the milk and results in the formation of "unappealing flavor compounds."
Milk's protein content is a main factor in determining its ideal steam time. Protein affects milk's ability to maintain its frothiness. Whole milk, which has a lower protein percentage, tends to result in a "thicker creamier foam," while skim milk, which has a high protein percentage, has foam with larger air bubbles. The fat content of the milk has a strong influence on the stability of the foam as well. Milk with a lower fat content — like skim milk — is "better at stabilizing foam at higher temperatures." So while whole milk may yield a creamier foam, that foam won't last as long as foam made from skim milk.
So what about non-dairy milks, like almond milk, that are frequently used at coffee shops? While almond milk has an incredibly low protein percentage, it manages to hold a "light and long-lasting foam." The science behind this "phenomenon stills remains to be determined." Go, check out a full explanation and demonstration in the video, below:
Chef Steps: Practicing latte art