Exercise isn’t only for building muscle and losing weight anymore.

“If a pill could give you all the benefits of exercise, it would be the best pill around,” says Edward Laskowski, M.D., co-director of Mayo Clinic Sports Medicine and a specialist in physical medicine and rehabilitation.

Yet doctors underprescribe exercise—even when research shows that it can deliver comparable benefits to drugs and surgery with fewer side effects, according to a recent review in the Canadian Medical Association Journal.

Here’s how to safely get the disease-fighting benefits of exercise for arthritis, COPD, and type 2 diabetes:

Arthritis

Though the pain of arthritis, in which the protective cartilage at the ends of joints wears away, may make you want to avoid physical activity, the right exercise can ease discomfort. A 2015 Cochrane review of 54 studies found that people with knee arthritis who were enrolled in exercise programs—mostly involving both aerobics and strength training, but also tai chi—reported less pain and an improved ability to perform basic daily tasks compared with those who did no exercise.

Getting started. Good form is key with osteoarthritis, to avoid muscle imbalances that can worsen discomfort. A physical therapist or certified personal trainer can show you how to perform exercises properly so that you can then do them at home or at a gym on your own.

You can also check arthritis.org for arthritis-­friendly exercise classes. Aim for 150 weekly minutes of low-­impact activities such as walking, swimming, or cycling.

With strength training, pay close attention to your leg muscles if you have hip or knee arthritis. “Strong muscles take pressure off the joints and improve stability, which can help prevent falls,” Laskowski says. If pain persists or exercise makes it worse, see your doctor. 

COPD

People with chronic obstructive pulmonary disease, a progressive illness that narrows airways and makes breathing difficult, might worry that exercise will make it even harder to catch their breath.

But by increasing overall fitness and helping to limit weight gain, it can improve breathing and reduce fatigue, according to Albert Rizzo, M.D., chief of Christiana Care Health System Pulmonary and Critical Care Medicine Section in Newark, Del.

Getting started. If your breathing isn’t stable or you have another condition such as heart disease, your doctor may want to evaluate you before okaying exercise. And some people may need supplemental oxygen during workouts.

If your COPD is milder, your doctor will either clear you to work out on your own or refer you to pulmonary rehabilitation to learn breathing techniques and exercise safety.

Try to build up to four or five weekly hour-long sessions, combining walking or stationary cycling with strength training.  

Type 2 Diabetes

Aerobic exercise and strength training can be almost as effective as some drugs in controlling blood sugar levels. For example, a 2012 JAMA study found that 9 percent of people with type 2 diabetes who combined an exercise program with dietary changes for two years eliminated their need for medication altogether.

Getting started. To avoid low blood sugar, time exercise around meals or insulin and always have a sugar-rich snack handy. If you have vision problems or altered sensation in your hands or feet, make sure you’re supervised at first.

Many hospitals have diabetes clinics or diabetes educators, and your doctor may be able to refer you to someone who develops workouts for people with diabetes.

Aim for 150 minutes of moderate activities such as walking, biking, or swimming each week, in three to five sessions.

Strength training is important, too: The more muscle you have, the less likely you are to store excess glucose as fat, says Sheri Colberg, Ph.D., emeritus professor of exercise science at Old Dominion University in Norfolk, Va., and a specialist in diabetes and exercise.

Aim for eight to 10 repetitions of eight to 10 different moves two to three times each week, using your own body weight or tools such as exercise bands or hand weights. 

Editor's Note: This article also appeared in the September 2016 Issue of Consumer Reports on Health.