Walking, jogging, and other forms of exercise subject bones to stress. They respond by laying down more collagen fibers and mineral salts in the bone matrix. This, in turn, makes bones stronger. But inactivity and lack of exercise tend to weaken bones because of decreased collagen formation and excessive calcium withdrawal.
To prevent these changes, as well as many others, astronauts perform special exercises regularly in space. Regular weight-bearing exercise is also an important part of the prevention and treatment of osteoporosis.