Insulation is a material used to slow heat loss, to slow the movement of heat from one place to another.
Most insulation uses air as a key ingredient. But to be really effective the air must be prevented from moving around. Examples of types of insulation that do this are foam and fiberglass insulation. Foam insulation surrounds little pockets of air with foam, and fiberglass surrounds it with small glass fibers.
A mistake I occasionally see, especially when wrapping tape tightly around insulation around pipes, is to compress the insulation. If you compress the insulation then you are compressing the air pockets. This decreases the material's insulating ability.
How insulation reduces heat loss
Insulation reduces three types of heat loss, all of which are discussed below:
The animation on the left below shows a typical solar heater. The air between the glass is supposed to act as an insulator but the air gap is too wide and gives too much freedom to the air to move. The air is undergoing convection. Here's how it works. Glass is used to allow sunlight in. The sunlight is converted to heat at the black absorber material. This heats the air. Hot air rises. When it reaches the top it has nowhere to go but toward the glass and down. As it moves down along the glass it gives up its heat to the outdoors.
The animation on the right above shows that the same thing happens if you have two pieces of cardboard, separated by an air gap, as you have in some box oven solar cooker designs. One cardboard is beside the heated area and the other is on the outdoors side. The air circulating in the gap transfers the heat to the outdoors through convection. Notice that the side convections also drives convection in an air gap in the bottom too.
As already illustrated at the top of this page, if instead we trap the air in foam or fiberglass then the air is restricted from moving around. If we have an air gap, as with the two convection animations above, then making the air gap small enough reduces the change of convection. A general rule of thumb among DIYers is to keep the air gap no wider than 3/4" to reduce the chance of convection.
The ability of a material to conduct/move heat through itself is called thermal conductivity. This conductivity varies depending on the temperature. The higher the conductivity the better the heat conductor and the worse the insulator. So you want a material that has low thermal conductivity.
Air is a very poor heat conductor. But we can't use air by itself; we have to surround it with something. So the best we can do is to use insulation that surrounds the air with materials that are also poor heat conductors like glass fibers, and foams like polyisocyanurate and polystyrene.
To illustrate the opposite, aluminium is a very good heat conductor so we wouldn't use that.
All materials conduct heat. The best you can do is pick a material that is a poor conductor and slow down the heat loss. Alternatively you could use a vacuum instead of insulation. A vacuum is the almost complete absence of any material at all, not even air, nothing. However, a vacuum requires a strong structure surrounding it otherwise the pressure of the air around the structure would just collapse it.
The molecules in all materials are constantly moving around. This movement emits electromagnetic radiation. This is a heat loss, usually referred to as thermal heat loss through thermal radiation.
Insulation can combat this by having many surfaces to radiate through as is the case with the sides of the air pockets in foam and with the many fibers in fiberglass.
The R-value is a measure of thermal resistance or how much a material resists the flow of heat through it using the various means discussed above. The higher the R-value the higher the resistance to heat and the better the insulator.
R-values are specified either in R-value per inch or R-value per thickness. For example, rock wool batting has an R-value of around 3 to 4 per inch. Roxul ComfortBatt brand of rock wool (see illustration below) which I've used in the past is labeled on the packaging as having an R-value of 14, or R14, clearly much more than 3 or 4. That R14 is the R-value per thickness. It comes in 3 1/2" thick sheets. If you divide the R-value on the packaging by the thickness, 14 / 3.5", you get 4, the R-value per inch.
U-value, sometimes called U-factor or Ug is the opposite of R-value and can be defined as the rate of heat loss through a material. It is most often used in Europe in SI units whereas in North America, R-value is used in imperial units. When using the same system of units, R-value = 1 / U-value.
In the SI system, U-value has the units W/m2 x K (watts per square meter per 1 degree of temperature difference in Kelvin.) In the imperial system, R-value has the units ft2 x F x hours / BTU (square feet times 1 degree of temperature difference in Fahrenheit times hours per BTU.) The former is used in Europe and the later is used in North America. To convert from U-value in the SI system to R-value in the imperial system, divide 5.68 by the U-value (which is the same as dividing it by 5.68 and then dividing 1 by the result.) For example, to convert a U-value of 3.3 W/m2 x K, do 5.68 / 3.3 to get 1.72 ft2 x F x hours / BTU.