Can adults still build bone mass, or only maintain it?
As an adult you can still increase your bone mass slightly, primarily through heavy strength training combined with high-impact exercises. Avoiding inactivity is at least as important as training itself.
As an adult you can still build modest bone mass after the age of 25, although the potential is smaller than it once was. Nearly two dozen human studies show that progressive strength training can slightly increase bone density. The effect is site-specific: only the bones you directly load become stronger. Intensity and duration largely determine whether there is any effect at all; a portion of the studies found little or no difference.
The most effective approach combines heavy strength training with high-impact exercises such as jumping. That produces greater bone gains than gentle movement. Swimming does not help, because your skeleton receives hardly any mechanical stimulus during it. In younger adults somewhat larger gains are possible; in older adults the effect amounts more to slowing bone loss.
At least as important as training is avoiding prolonged inactivity. Bone loss from sitting still is greater than the bone gain that exercise produces. Moving is therefore doubly worthwhile: it builds something up and protects you against the loss that inactivity causes.
For women after menopause there is an additional complicating factor. Oestrogen deficiency causes sharply increased bone breakdown, in both the inner and the outer part of the bone. Exercise cannot compensate for this loss: oestrogen has an independent, irreplaceable effect on bone preservation.
Adequate calcium (1000-1200 mg per day) and vitamin D (600-800 IU per day) can, together with more physical activity, be helpful for premenopausal women with low bone density, although this is based on limited research. For people with osteoporosis and a high fracture risk, prescription bone medications such as romosozumab and teriparatide exist, which substantially increase bone density -- for example plus 11% in the spine after twelve months for romosozumab. These are treatments for a specific medical population, not for healthy people who want to optimise their bones.
Based on multiple human studies and limited research in premenopausal women. The strength of evidence differs by sub-question: strong for the harmful effect of oestrogen loss and inactivity, moderate for exercise and bone building, limited for calcium and vitamin D in premenopausal women, and strong for anabolic medication in osteoporosis patients.