Based on the study by Todd JA, Robinson RJ. Osteoporosis and exercise. (Postgraduate Medical Journal 2003;79:320-323) Cross sectional studies have shown a positive correlation between bone mineral density (BMD) and exercise.
Intervention studies suggest that high impact exercises are better at increasing BMD

Exercise should be encouraged in those at risk of osteoporosis and those with osteoporosis, along with other life style measures (adequate calcium intake, stopping smoking, modest alcohol consumption, and maintaining an adequate body weight).
Based on a study by Bonaiuti D, et al (2002) Aerobics, weight bearing and resistance exercises are all effective in increasing the BMD of the spine in postmenopausal women. Walking is also effective on the hip.
Exercise has important additional benefits, such as increased muscle strength and coordination, which decrease the risk of trauma leading to osteoporotic fractures.
Exercise also has other benefits, which are important for the general wellbeing of patients—for example, decreasing cardiovascular disease, decreasing the risk of diabetes, and helping depression.