To create foam, work (W) is needed to increase the surface area (ΔA): where γ is the surface tension. One of the ways foam is created is through dispersion, where a large amount of gas is mixed with a liquid. A more specific method of dispersion involves injecting a gas through a hole in a solid into a liquid. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.