Body odor can be caused by several factors, both internal and external.  Diet, hygiene, body chemistry and lifestyle choices all can play a role in how you smell.  People often associate body odor in a negative  manner, but interestingly enough scientist theorize its initial purpose  was meant for good.  It was thought to be used as a method of  identification to know family members and those of close kinship.  It  was also thought to be used as a means to signal distress or danger.   Whatever the case may be, times have changed and so have the ways in  which we deal with body odor.  Deodorants and perfumes are used to  prevent and cover unwanted odor. 

Body odor causes stem from compounds and acids that have an unpleasant odor to them.  These compounds are created and/or released  from bacteria, from food we eat and even from the body itself.  They  come in different forms and have different smells to them. 

Bacteria is probably the most common source of odor  compounds.  We have hundreds of different types of bacteria that live on the surface of the skin.  These bacteria are a natural part of the  human skin flora and survive by feeding off of proteins in our sweat.   As they feed on sweat, they release amino acids and other compounds that stink.  Different bacteria produce different types of acids and thus  result in different types of smell.  The two most common types are  propionic and isovaleric acids.  Propionic acid tends to smell like  vinegar, whereas isovaleric acid carries an odor similar to that of moldy cheese.

Diet and food can also be a source of body odor.  Certain  foods contain high amounts of sulfur compounds
known as volatile sulfur  compounds.  Garlic, meat, seafood, egg yolk, legumes and spicy foods are most common sources of VSCs.  As food is digested in the body, these  compounds are released and absorbed into the blood and organs.  They  eventually make their way out of the body through sweat, pores and other
openings in the body.  As you might imagine, volatile sulfur compounds  have a strong odor of rotten eggs or ammonia.

Body chemistry and overall health can influence body odor.  Toxins can  be a cause for body odor and an improperly working liver or kidney will  allow these toxins to build up.  Similar to sulfur compounds, they get released and emitted from the body through sweat and skin. 

In addition, certain deficiencies will lead to odor issues.  One example are those people who suffer from trimethylaminuria; a  condition in which the body has a strong, fishy odor.  This is caused  when the body lacks the proper genes which work to break down the  compound trimethylamine.