The liver is unusual in that it has a double blood supply; the right and left hepatic arteries carry oxygenated blood to the liver, and the portal vein carries venous blood from the GI tract to the liver.
The venous blood from the GI tract drains into the superior and inferior mesenteric veins; these two vessels are then joined by the splenic vein just posterior to the neck of the pancreas to form the portal vein. This then splits to form the right and left branches, each supplying about half of the liver.
On entering the liver, the blood drains into the hepatic sinusoids, where it is screened by specialised macrophages (Kupffer cells) to remove any pathogens that manage to get past the GI defences. The plasma is filtered through the endothelial lining of the sinusoids and bathes the hepatocytes; these cells contain vast numbers of enzymes capable of braking down and metabolising most of what has been absorbed.
The portal venous blood contains all of the products of digestion absorbed from the GI tract, so all useful and non-useful products are processed in the liver before being either released back into the hepatic veins which join the inferior vena cava just inferior to the diaphragm, or stored in the liver for later use.