Thermal grease is known by a number of names including:
CPU grease
heat paste
heat sink compound or paste
thermal compound, gel or paste
thermal interface material.
It is a thermally conductive material which is usually electrically insulating which helps to dissipate heat from a device. Its main function is to ensure there is no air space between which would act as a thermal insulator. It fills in the microscopic imperfections on the heatsink and device.
It is most commonly used between a CPU and a heat sink to maximise heat transfer. It is also used on other electronic components which create heat and also need a heat sink such as MOSFET transistors.
There are other types of products to eliminate the air gap under a heat sink:
Thermal Adhesive
Thermal Gap Pads