Seafoam (tm) is an intake tract cleaner/degreaser used primarily these days on direct injection gas engines to clean deposits and varnish buildup on intake valves and ports.
The idea is that, over time, residue of oil vapors from the crankcase ventilation circuit builds up on the intake port rims, valve edges and around the valve guides which impedes intake flow and causes rough running and poor performance. In carbureted and port injected engines the fuel/air intake charge "washes" these deposits away and prevents buildup, but that doesn't happen in direct injected engines.
Seafoam is introduced into the intake tract of a running engine and is supposed to clean away these deposits and varnish and therefore restore efficient operation of the engine.
I remember reading this was a really big deal around the time Porsche introduced the type 991 H-6 engines...owners were complaining of poor idle and high RPM performance and that the seafoam treatment recommended by dealers to fix the issue was short-lived and not covered by warranty. If performed at a Porsche dealership it was quite an expensive service operation (what's new), but if not performed by a certified Porsche service facility it would void the factory warranty. A popular unofficial remedy was to simply disconnect the CCV system where it entered the intake manifold between routine service visits.
Entrepreneurial souls sold plug kits that would keep dirt out of the works and others sold in-line valves. Separators appeared on the market that purported to keep crankcase gunk out of the intakes whilst being emissions control compliant and not requiring owners to get intimately involved in their car's engine compartments each time they dropped it off for service, but I don't know if they worked or if were viewed as suspicious by the warranty compliance people at dealerships.