Answer :

air or any sort of gas is not that good in conducting heat in relation to other materials. 
since foam consists of many bubbles with trapped gas it both stops convection by simply being in position, and prevents conduction of heat through it, due to the gas inside

Answer:  Foam is a good insulator for two reasons. First, it is filled with gas bubbles; gases conduct heat less effectively than either liquids or solids, and trapping the gas in small bubbles prevents the gas from effectively transferring heat via convection.

Explanation:

Hope this helps <3