Lactic acid produces casein and then forms a curd that can quickly allow the entire amount of milk to curdle within 24 hours.
Milk curdles because of a simple chemical reaction that can be set into place for a variety of reasons.
Milk is comprised of several compounds, primarily fat, protein, and sugar. The protein in milk is normally suspended in a colloidal solution, which means that the small protein molecules float around freely and independently. These floating protein molecules refract light and give milk its white appearance.
Normally these protein molecules repel each other, allowing them to float about without clumping, but when the pH of their solution changes, they can suddenly attract one another and form clumps.
This is exactly what happens when milk curdles. As the pH drops and becomes more acidic, the protein (casein) molecules attract one another and become "curdles" floating in a solution of translucent whey. This clumping reaction happens more swiftly at warmer temperatures than it does at cold temperatures.
For more info on why does milk curdle, visit TheSpruce.com.
Tip: Clemson.edu shares advice on safe handling of milk & dairy products.