The surface tension at the border between the fluid lining and the inhaled gas (gas/fluid interface) in alveoli determines the motion of the alveoli as a whole.  According to Lapace's Law, high surface tension in the gas/fluid interface of alveoli prevents the alveoli from inflating, which causes lung collapse. lipid arrangement in the fluid lining of alveoli is the primary determining factor of this surface tension since the lipids form a thin film (monolayer) on the surface of the fluid lining at the gas/fluid interface. Different lipids allow for different ranges of motion and can be compacted different.
SP-B plays a role in this by selected certain lipids and inserting them into the gas/fluid interface.  The lipid shown to be most needed on this surface (Dipalmitoylphosphatidylcholine) does not easily move to the gas/fluid interface, but SP-B helps ease and speed up this process.
SP-B also indirectly reduces surface tension by organizing the lipids underneath the surface of the gas/fluid interface in structures called tubular myelin. Effectively, SP-B cuts and pastes pieces of the lipid bilayers to form the three dimensional structure of the tubular myelin. This structure is the support and lipid source for the gas/fluid interface, where surface tension is a critical factor in lung function.