Heat therapy should be used on chronic injuries and late stage acute injuries. A chronic injury is one that has persisted for a length of time and is usually due to overuse and biomechanical issues, as opposed to a traumatic incident. Heat can be used before exercise to warm the muscles, but should be avoided after exercise.
At home the easiest way of applying heat to an injury is by using a widely available heat pack. These can be made of varying materials, often gel or wheat based which either require heating in a microwave or submerging in hot water. Wrapping such an item in a towel and applying it to the injuy is perfectly suitable. This should be applied be 15-20 minutes at a time. Warm, damp towels, warm baths and heat rubs can also be easily used at home although may not be as effective at warming deeper tissues.
Do not use a dry Heating pad. It will dry the muscles and increase the pain.