foam? like the white foam stuff you see at the ocean? that sounds like skimmer scum. check that your skimmer isnt full and overflowing the gunk back to the tank. or if something died the stuff could be rotting away and is catching somethin in your tank and foaming up.
how thick is it? how bic is it? it could be natural foam forming. the foam is protiens that stick to the surface of bubbles, if your tank has a lot of flow it could be like a little mini skimmer action. so if it is right on the corner or somthing of the overflow then that might be it as well. that is as natural, just from funny flow. same affect when you see ocean waves all foamy, its because the turbulance is causing it.