For a musculoskeletal injury (always recommend a physician veryify any possible other issue, as Sue noted above and others) ice is the first method of reducing swelling and discomfort. While heat feels good, it also can speed up the chemical reactions taking place that are causing inflamation. While inflamation is part of the healing process and may serve to reduce movement of the affect area, it also will inhibit healing if it is not kept under control. I am in the school of thought where heat is only recommended as a passive warm up for tissues that will be used for some activity directly after heating.
As for using ice after 24 hours, everytime a person with an injury uses the affected area, some of the tissue will be reinjured and the inflamation process will begin again in those tissues. Re-applying ice at the end of the day will assist in reducing inflamation and enhance healing. In cases of low back pain ice prior to going to sleep can also reduce inflamaton and discomfort. There is a great deal more to understanding and using ice for recovery and managing discomfort. I suggest anyone experiencing an injury speak with their physician, follow their recommendations. Never apply ice directly to the skin, place a towel or other reasonably thick cloth between the ice and the skin. Ice after any activity that noticeably affects the area and ice prior to sleeping for as long as you are getting relief and swelling of the area is still present.
Injuries are a part of life. Managing injuries is also a part of life. Don’t ignore injuries. Ignoring an injury could have serious consequences later.
I teach a CEC course on recovery strategies. Anyone planning to visit the Big Island of Hawaii, check out my soon to be finished website (it is up, but not complete) at www.hawaiifitnessacademy.com .