Does foam prevent convection? If not, what does it prevent? (radiation and conduction)

and also how? (if it even does)

Accoding to this article in Wikipedia foam insulation blocks all three.

Conduction
convection
radiation
You can read more about it here.
http://en.wikipedia.org/wiki/Spray_foams_%28insulation%29

Foam does not prevent convection entirely, but it can significantly reduce it. Convection is the transfer of heat through the movement of fluids, such as air or water. Foam acts as an insulating material by trapping air or gas bubbles within its structure. These trapped air pockets disrupt the natural flow of the fluid, reducing the transfer of heat by convection.

While foam may not completely prevent convection, it does provide a barrier that slows down the movement of the fluid and limits the heat transfer. This can be particularly useful in insulation applications where reducing convection is desired.

In addition to convection, foam is also effective at preventing heat transfer by radiation and conduction. Radiation is the transfer of heat through electromagnetic waves, and foam can absorb or reflect these waves, restricting their movement. Conduction, on the other hand, is the transfer of heat through direct contact between materials. The structure of foam, with its low thermal conductivity, hinders the transfer of heat by conduction.

To summarize, while foam does not completely prevent convection, it does impede its movement. Additionally, foam is effective at restricting heat transfer by radiation and conduction due to its insulation properties.