What happens to bone density when you don't exercise?

Goes down. One of the biggest determinants of bone mineral density is lean body mass. Exercise is important for building lean body mass. Exercise is also important for putting load on your bones. This load is important for bone mass as bone strengthens as stresses are put upon it. Weight-bearing physical activity such as walking or running is better for building/ maintaining bone than non-weight-bearing activities such as swimming.
It worsens. It goes down. Humans are locomotive animsl designed to move. If u move , less u lose bone.