At the most basic level, foams are a structure that traps air in bubbles. Foams are similar in this way to an emulsion, which is when a liquid traps fat in a structure, or fat traps liquids in a structure. The structure can be made from a variety of things such as proteins, water, or fat. The texture of the foam is determined by the size of the bubbles and how much liquid is in the foam.