Foam is the result of algae dying off. Manually remove it with a fine mesh net so that it will not fall back to the water column.
Also, be sure to keep filter clear and flowing properly. Algae cells build up quickly in the filter.
← I Added Nualgi and Now I Have Foam on my Pond?