The liver is composed of numerous functional units called lobules. Within each lobule, epithelial cells called hepatocytes are arranged in layers that radiate out from a central vein. Hepatic sinusoids are spaces that lie between groups of layers, while smaller channels called bile canaliculi separate other layers. Each of (usually) six corners of the lobule are occupied by three vessels: one bile duct and two blood vessels (a portal triad). The blood vessels are branches from the hepatic artery (carrying oxygenated blood) and from the hepatic portal vein (carrying deoxygenated but nutrient‐rich blood from the small intestine).
Blood enters the liver through the hepatic artery and hepatic portal vein and is distributed to lobules. Blood flows into each lobule by passing through the hepatic sinusoid and collecting in the central vein. The central veins of all the lobules merge and exit the liver through the hepatic vein (not the hepatic portal vein).
Within the sinusoids, phagocytes called Kupffer cells (stellate reticuloendothelial cells) destroy bacteria and break down expended red and white blood cells and other debris. Hepatocytes that border the sinusoids also screen the incoming blood. They remove various substances from the blood, including oxygen, nutrients, toxins, and waste materials. From these substances they produce bile, which they secrete into the bile canaliculi, which empty into bile ducts. Bile ducts from the various lobules merge and exit the liver as a single common hepatic duct. The common hepatic duct merges with the cystic duct from the gallbladder to form the common bile duct, which in turn merges with the pancreatic duct to form the hepatopancreatic ampulla. This last duct delivers the bile to the duodenum.
The gallbladder stores excess bile. When food is in the duodenum, bile flows readily from the liver and gallbladder into the duodenum. When the duodenum is empty, a sphincter muscle (hepatopancreatic sphincter) closes the hepatopancreatic ampulla, and bile backs up and fills the gallbladder.