Colorado State University states that bile salts play a role similar to a detergent in the digestion of fat by emulsifying the hydrophobic fat molecules. The tiny suspended particles of fat that result from this are much more accessible to enzymes necessary to digest them than the larger drops that would remain without bile salts. The bile salts are also critical in the absorption of fat-soluble vitamins, which include vitamin D.
According to Colorado State University, bile salts are generated in the liver, where they are released along with several waste products into the gallbladder. The gallbladder, in turn, removes a significant amount of water from the bile mixture before secreting it during digestion. The bile enters through the biliary ducts into the small intestine. In addition to allowing the body to digest fat, the bile salts also carry waste cholesterol, which is otherwise highly insoluble in water.
Colorado State University explains that the structure of a bile salt has both hydrophilic and hydrophobic ends, which derive from an amino acid and an altered cholesterol molecule, respectively. This structure is what allows them to be both soluble in water and emulsifiers of fats, and it is also what allows them to fulfill their role in cholesterol homeostasis.