Bilirubin is the waste left when old red cells are broken down. Where it builds up tells you where the blockage is.
Bilirubin comes from breaking down haem. Macrophages turn haem into biliverdin, then unconjugated bilirubin, which travels in the blood bound to albumin. The liver conjugates it so it dissolves in water and passes into bile. Gut bacteria then turn it into urobilinogen and stercobilin. Unconjugated bilirubin rises with haemolysis or poor conjugation (e.g. Gilbert's syndrome). Conjugated bilirubin rises with poor excretion, such as cholestasis. Jaundice is visible above 35 µmol/L.