Firefighting foam creates a layer over the fuel surface, preventing oxygen from reaching the fire and thereby smothering it (removing oxygen from the fire triangle).