|MadSci Network: Chemistry|
Basically you are duplicating the process for making butter yourself. You add energy (work) to the system. This breaks the fat droplet membranes and allows the fat molecules to come together (coalesce). When enough fat comes together, one gets a phase inversion in part of the system, and the fat becomes the continuous phase and the water the discontinuous phase -- and if the fat is a solid fat, one gets a material from milk that we call butter. Butter is over 80% fat with water and solubles making up the rest of the system. The remaining material is then buttermilk.
Try the links in the MadSci Library for more information on Chemistry.