These are questions that we are often asked as therapists and the answers are not always straight forward. This is not helped by differing opinions between practitioners and online sources. Here i will give some help to try and explain the rationale to what I advise to do when pain strikes or injury occurs.
Cold is ideal for an injury that has just occurred (within 1 or 2 days). Traditional thinking was that this would reduce inflammation to the area and prevent swelling & the accumulation of inflammatory markers. Research has shown that this is unlikely to be the case as the necessary level of cold cannot be reached through external application. This is not to say that cold is not beneficial just that the mechanism of healing is different to what we believed.
In fact the reason that cold is beneficial in this stage is due to the numbing effect on the area of pain coupled with its ability to alter the tone of muscular spasm. This makes it a great treatment for areas that are very acute (in spasm) and even restricted in movement .
Want to know more? This blog contains more information:
https://plinthsandplatforms.com/2014/05/16/cryotherapy-therapeutic-but-is-it-clinically-relevant/
Simply wrap either a bag of frozen peas or a cold pack in a tea towel and apply it to the affected area for 5 minutes at a time, ensuring that it is not cold enough to damage the skin. This can be repeated as often as necessary within the first day or two of injury. For icing on the go you can by cold gels that are fairly good .
Heat is great for more chronic (longer standing) aches and pains. (ie) Problems that persist for more than a few days. In these injuries muscles are often held contracted for a long period of time, if this continues the tissues can become ischemic (lose blood supply). Heat will help to counter act this effect, helping to draw new blood to the area and encourage inflammation which helps the tissues to heal.
Heat can be applied in many ways either hot water bottle, heat pack, microwavable bean bags, deep heat etc. This can be applied in longer cycles than cold 5-10 minutes at a time again ensuring that you do not burn or injure yourself with the application. Other means of getting heat to the muscles that people find beneficial are baths (often with Epsom salts) , showers & saunas.
More info here:
https://www.spine-health.com/treatment/heat-therapy-cold-therapy/benefits-heat-therapy-lower-back-pain
The advice above covers the majority of injuries that I see however there are always exceptions to the rules. As such it is always advised to have your injury assessed by a professional prior to any application. Subjectively some people also find the opposite advice to be more effective as some people do not like that sensation of either hot or cold on their skin.