It is used particularly in iron alloys, such as steel. It is generally used after quenching. Quenching causes the material to become hard and brittle. The metal, in that state, may not be suitable for many applications.
Tempering is done by heating the material and then gradually cooling it. The heating should be very gradual to prevent the formation of cracks. The temperature to which the metal must be heated is based on the desired toughness and hardness.