The general principle is that soundwaves are carried through a medium like air or solid objects.
Once soundwaves hit these panels, they get trapped inside the open cells. Eventually, the energy in the waves would die down leading to a dampening on the noise.
However, these panels do not block sound. The ones that block sound from passing through are solid objects which serve as barriers.
So if you’re looking for a material to block sound, you will be disappointed with soundproof foam panels. All they do is absorb the soundwaves, reduce the echo, and make the room seem quieter.