You twisted an ankle, ran a grueling 20 miles or are coping with a bout of tendonitis. Whatever type of injury you have, your first instinct is probably to ease the pain. Applying heat or ice to the affected area can be helpful —but which one should you use?

Ice and heat work differently to treat injuries, and their effects provide clues as to which method would be most effective for your pain. “Applying ice constricts blood vessels, decreases blood flow and reduces inflammation and pain,” says David A. Wang, MD, a sports medicine physician at HSS Paramus.

Follow these guidelines from Dr. Wang to figure out which is right for your injury.

When to Use Ice

Ice is best for acute injuries, including bumps, sprains, strains, pulled muscles and acute joint pain. An injury is acute if it is less than two to four weeks old. “It’s best to apply ice immediately after an injury and continue to ice for the first 24 to 72 hours,” says Dr. Wang. This reduces inflammation and bruising, which is important because they can cause additional tissue damage.

Ice helps the healing process and can continue to be an effective therapy for one or two weeks after the initial injury. If symptoms persist past the first few weeks, you can try applying heat to help with muscle stiffness.

How to Use Ice Safely

“When we talk about applying ice, it doesn’t have to be literally ice cubes; it can be anything that’s cold,” says Dr. Wang. An ice pack or block, a bag of frozen vegetables (peas work well), an ice bath or a cold wrap can also do the trick.

While there are no set rules, applying ice for 10 to 15 minutes is long enough. Then remove the ice and let the tissue return to a normal temperature. Reapply on and off throughout the day. “Work it into your life,” advises Dr. Wang, and use it as long as it’s helpful.

Applying ice directly can actually burn your skin, so use a towel or other barrier between your skin and the ice for protection. Take precautions if you have decreased skin sensation caused by neuropathy, a common complication of diabetes, Raynaud’s syndrome or other issues. These illnesses dull your sensitivity to cold. Because extreme cold can damage the skin, be extra mindful of how long you leave ice on.

When to Use Heat

Heat is best for chronic pain or after swelling has gone down. “A chronic injury is one that has lasted for longer than four weeks, or a much older injury or condition that has not resolved,” says Dr. Wang.

Heat can help loosen tight joints and muscles and provide pain relief for chronic muscle and joint pain.

The one thing you never want to do is use heat in the first days after an acute injury. Applying heat can increase inflammation and worsen your condition.

How to Use Heat Safely

Apply heat with a heating pad, a hot-water bottle, a warm compress, a hot bath or a heat wrap. As with ice, remove the heat source after 10 to 15 minutes. Heat should be used on and off throughout the day for as long as it provides relief.

Heat can also burn or damage skin, so place a barrier between your skin and the heat source. Also, refrain from falling asleep with heat applied to avoid burning your skin.

When to Use Both Heat and Ice

  • Before and after workouts. Most workouts include a warm-up and cool-down phase. The same general approach can apply to the use of heat or ice in your workout routine. Use heat before a workout to warm up your muscles and loosen your joints. Use ice after a workout to cool down or reduce muscle and joint inflammation. “It’s not advisable to use ice before a workout. This can cause muscles to stiffen and could affect your performance,” explains Dr. Wang.
  • To treat arthritis. Arthritis can cause stiffness and pain in your joints. “With arthritis, ice and heat play a role,” says Dr. Wang. If you are having an acute arthritis flare with pain, swelling, and warmth, this is often from inflammation and ice should be used. For general chronic stiffness, heat may work better.
  • To help with overuse issues such as tendonitis and tendinosis. “I tend to favor ice early on as there is potentially more inflammation at this stage,” says Dr. Wang. “If symptoms continue for a month or longer, ice or heat can be helpful.”

When to See a Doctor

Some injuries require medical attention, not just rest and heat or ice. If you’ve sprained your ankle and it’s limiting your function or you can’t bear weight on it, for example, see your doctor as soon as possible.

“Ice and heat therapy are not cures,” explains Dr. Wang. “They are techniques that can be helpful to promote healing and ease pain.” Additional treatments such as over-the-counter, non-steroidal anti-inflammatory drugs like ibuprofen or physical therapy might also help. Ask your doctor for recommendations.

Dr. Wang is a sports medicine physician at Hospital for Special Surgery specializing in the nonsurgical treatment of acute and overuse sports-related injuries.