The liver makes bile. Bile ducts carry it to the gallbladder for storage or to the small intestine to help digest fats.

What bile does
In the small intestine, bile helps digest fats and supports absorption of fat-soluble vitamins. The pancreas provides enzymes that contribute separately to digestion. See the NIDDK overview of how digestion works.
Bile and gallstones
Gallstones often contain cholesterol or bilirubin. Some cause problems when they block the ducts that carry bile. See the NIDDK explanation of gallstones and the biliary tract.