One of the best ways to strengthen your bones and prevent osteoporosis is by getting regular exercise. Even if you already have osteoporosis, exercising can help maintain the bone mass you have.