Double glazing is better than single glazed because the gap stops conductions so heat transfer is more difficult. A vacuum is better than just an air gap because there are no particles in a vacuum meaning convection cannot take place as there are no particles for the heat to transfer through.
Cavity wall insulation is a gap between two layers of brick on the outside wall of a house. It reduces the rate of energy transfer between the outside walls. The insulation is pumped into the gap and it traps the air in small pockets reducing the rate of conduction.