Foam can be caused by applying a foaming algicide in pools with jetted returns, attached spas or water features. Foaming can also be caused by a foreign contaminant such as soap or oil entering the pool or the build up or organic contaminants in the pool water. Foam should dissipate over time, but the use of anti-foaming agents will help clear the foam much more rapidly.