In certain buildings and industries, such as refineries or in the chemical industry, water alone is not sufficient to ensure successful firefighting, as would be the case when dealing with flammable liquids.
Then a foam extinguishing system is the right solution. Here the water is combined with air and a foaming agent is added to create a mixture, which upon spraying produces a foam blanket that covers the fire and cuts it off from the oxygen supply - to extinguish the fire and cool at the same time.