When in doubt, use ice.If a patient and I find that ice is not working for the area, I usually tell them to do both. You can put heat on the area (best form would be a hot bath or hot tub) but then put the ice on afterward, and always end with ice. You will still get the relaxing feeling from the heat, but also the anti-swelling effect of the ice. This alternating of heat and ice can actually help the flow of the fluid that is bringing healing components to the damaged area.
So why err on the side of ice?
It has to do with the swelling in the area. When your body gets injured, it needs to send fluid (swelling) to that area to help it heal. The issue with that is most people don't move correctly when hurt. When this happens, that swelling stagnates in the area and can cause issues such as an increase in pain, irritation to nerves, and/or decreased mobility. And correct mobility in an injured area has been shown to help in the healing process and help prevent issues down the road
It also helps that ice dumbs down and numbs the pain a little bit.
It boils down to this. Anytime you injure your body, it's essentially like spraining your ankle. I guarantee you will not see a coach or an athletic trainer put heat on that sprained ankle. They put ice on it to keep the swelling at a manageable level so that they are able to prevent immobility to the injured joint.
So, the next time you get an injury, put some ice on it. Just remember that 20 minutes should be plenty of time, but you will need to do it more than once. Give yourself at least a 40 minute break before you put the ice on again. An BE SURE to have some sort of barrier between your skin and the ice. For instance, a t-shirt works really well.