Typically used in headers, window and door frames, electrical panel, piping, and penetrations in ceilings, and wall cavities.
Photo Source: Summerhill
Expanding foam sealant is not to be confused with spray-applied foam.