In short
DEXA (dual-energy X-ray absorptiometry) is an imaging scan that uses two low-dose X-ray beams at different energy levels to distinguish and quantify bone mineral density, fat mass, and lean (muscle) mass throughout the body.
Because bone, fat, and lean tissue absorb X-rays at different energy levels to different degrees, comparing the attenuation of two X-ray beams lets a DEXA scanner calculate the composition of the tissue the beams pass through at each point on the body. The result is both a whole-body and regional (arms, legs, trunk) breakdown of bone mineral density, fat mass, and lean mass, along with visceral fat estimates in modern scanners.
DEXA is the clinical gold-standard test for diagnosing osteoporosis and osteopenia, reported as a T-score (comparison to a young healthy adult reference population) and Z-score (comparison to an age-matched population), and is recommended by professional guidelines for bone density screening in postmenopausal women and older men, and in anyone with major osteoporosis risk factors.
In longevity and fitness contexts, DEXA's body-composition output (particularly visceral fat and appendicular lean mass, used in some sarcopenia diagnostic criteria) is used to track fat and muscle changes over time with a precision that a bathroom scale or bioelectrical impedance device cannot match. It does carry a small dose of ionizing radiation, though far lower than a standard X-ray, and results can vary somewhat between different scanner models and calibration, so tracking trend over time on the same machine is more reliable than comparing a single absolute number across facilities.