Foam is a very floating synthetic material. With it you can tie imitations of large insects (grasshoppers, beetles, etc..) including the famous Chernobyl Ant.
And also used for to tie the wings of Parachute, going to replace the tuft of polypropylene. This allows the dry fly to anchor better to the surface of the water, preventing it from sinking even when the artificial fly is in particularly animated currents.
To make the best use of it, you just need to cut out the foam sheets according to your needs, to do so there are also special shaped pliers, and fix it to the hook with the tying thread.