When to Ice
Icing should be used when an athlete faces an injury that happens immediately upon fall, contact, collision (an acute injury). Acute injuries also include symptoms of pain, swelling, and tenderness.
Chronic injuries (ones that has developed over time) could also use icing. For example, if an ankle is injured, yet you still exercise on it, icing could be used after exercise.
Icing is effective in these cases because it limits pain and swelling that may result from these injuries. Icing constricts the blood vessels and reduces inflammation as well.
When to Heat
When an injury is not acute, you probably should be heating it.
Stiff joints and muscles could use the attention of heat. Heating the injured area before an event, loosens the joints and muscles, allowing increased elasticity and blood flow.
It's best not to heat after exercise or activity. Resort back to icing after exercise or activity. A warm and wet towel is highly recommended during heating.
As always, talk to a doctor if an injury remains painful after two days.