The ability of fats to influence the texture of food is due to two things. First, they can form crystals that eventually can melt in the mouth, as is the case with cocoa butter in chocolate. Second, they can form complex phases with water in the form of emulsions. Fats are often added to foodstuffs in the form of oil.
The degree to which a fat is unsaturated, which dictates its melting point, often determines how it can be used in cooking. Hard, pliable fats—for example, butter, firm margarine, and lard—which all have high melting points, are well suited for baking. Cakes and pastries made with them are generally airy and exhibit the delicious flaky, tender, and crisp structure that we know from piecrusts, cookies, and Danish pastries. The fatty dough helps trap small droplets of water in the dough. The droplets evaporate during baking, leaving behind the air pockets that are responsible for the flaky structure. To achieve the best results it is necessary to pulse or rub together thoroughly flour, fat, and sugar (if used) to make a crumbly mixture. How fine it is determines the size of the flakes in the baked pastry.