Thermal Interface Material
Thermal Interface Materials (TIM) are secondary materials installed between the heatsink and the device that are designed to improve the thermal transfer to the heatsink. Regardless of how flat or smooth the device and heatsink are, there will always be small air voids between the two surfaces. Since air is a not a great conductor of heat, a TIM replaces the air and fills the voids. There are many types of TIMs and each has its best case usages.
Double-Sided Tapes (DST) are a common material generally used on small heatsinks. They vary in thickness and can be used to fill voids between the device and the heatsink. The DST also has mechanical strength to hold the heatsink in place. Some DST materials are better suited for plastic devices vs. metal, so make sure the final use is well understood.
Thermal grease is a common material that is spread on the bottom surface of the heatsink. It doesn't have any mechanical properties, so it is usually used in conjunction with screws, clips, or other mechanical fasteners to keep the heatsink in place. Grease comes in different conductivities and will become very thin as more force is applied. It also tends to be messy, so watch where it is used.
Phase-Change Materials (PCM) are a good alternative for grease. They have a similar thermal performance to grease, but without all the mess. The material is solid at room temperature, but at elevated temperatures the material changes into a gel-like substance. In the gel-like state, the material will become very thin, but it won't run or drip like a liquid.
Unlike grease or PCM, a gap pad material is intended to fill a large void between a device and the heatsink. A gap pad is a compressible material most commonly used when there are multiple devices to be contacted to the heatsink, but all the different device heights make it difficult to use a thin material. These materials come in a variety of thicknesses, conductivities, and durometers to meet a wide range of needs.
An alternative to a gap pad is a thermal putty/gel. Like a gap pad it can be applied in many different thicknesses, but unlike a gap pad it doesn't have any compression memory. This can be especially useful when contacting many devices or when the device is pressure sensitive. A putty/gel will displace excess material outwards and only apply a small amount of pressure to the device.
Most high-performance TIMs have great thermal properties but no mechanical properties, so the material can't be relied upon to hold the heatsink in position.