Butter is a firm fat that’s made by churning (agitating) cool cream. Cream, its unadulterated state, is an emulsion of fat within water: little butterfat globules within thin lipoprotein membranes, suspended within a watery medium. The act of churning breaks most of those membranes allowing the butterfat — a mix of different types of triglyceride molecules — to flow out.
At that point some very interesting things happen. Groups of like molecules start to collect and stack up on one another, forming crystals. The crystals collect into large masses and when the masses are pressed most of the rest of the watery medium (known as buttermilk) is expelled. The result is a reverse of the original emulsion: tiny drops of water within a medium of fat crystals, free fats and a few remaining butterfat globules.