Body odor is primarily caused by the bacterial breakdown of sweat, which is secreted by the apocrine glands in areas like the armpits and groin. Factors such as diet, hygiene, genetics, and health conditions can influence the intensity and nature of body odor.