One of the most common questions that I get from patients is should they use heat or ice. You want to use ice to decrease pain and inflammation. Heat is good to decrease muscle tightness. You can never go wrong with ice, but if you have some inflammation going on, heat can make the pain worse. Heat brings more blood to the area, causing an increase in inflammation and an increase in pain. You can never go wrong using ice, but you could make it worse using heat. So if you have a relatively new problem, make sure you use ice and not heat.
When using ice, only keep it on for 20 minutes or less. After 20 minutes your body starts to think that the area where the ice is being applied is freezing so it will rush blood to the area. The rush of blood causes an increase in inflammation, counteractive to what you are trying to accomplish with the ice in the first place. Therefore, when you use ice, wrap it in a damp cloth to apply it to the area affected for no more than 20 minutes at a time. At most, I recommend to my patients using 20 minutes of ice every hour.
Now, I am not saying that there is never a good time to use heat. Heat is good if you have conditions such as chronic arthritis or chronic muscle tightness. Like ice, you only want to use heat for 20 minutes at a time, and to protect the area, make sure that you wrap the heating pad in a cloth. Also, if possible, use moist heat as opposed to dry heat. Moist heat allows the heat to penetrate deeper and is more effective.
I hope this answers any questions you may have on whether to use ice or heat.