When a substance enters the body, it undergoes metabolic processes primarily in the liver. These processes involve phase I and phase II reactions, where the parent compound is modified to form more water-soluble metabolites, which can then be excreted in the urine. Phase I reactions often involve oxidation, reduction, or hydrolysis, while phase II reactions involve conjugation with compounds such as glucuronic acid or sulfate.