The liver receives blood from the hepatic artery (from the heart) and the portal vein (from the intestines). It filters this blood to remove harmful substances, converting them into bile, which is then excreted as stool. Some toxins also enter the bloodstream, where the kidneys filter them out and excrete them as urine. Thus, the liver and kidneys work together to expel waste and toxins from the body.