Bone is not a static part of the body — it's constantly being resorbed (broken down) and formed throughout your life.
Your entire skeleton is replaced about every decade, according to the NIH.
During your childhood and teenage years, bone formation occurs more quickly than bone resorption, resulting in growth.
You reach your maximum bone density and strength around age 30, after which bone resorption slowly overtakes bone formation.
Osteoporosis develops when there's an abnormal imbalance between bone resorption and formation — that is, resorption occurs too quickly, or formation too slowly.