The liver has an essential function in processing aging red blood cells. They are replaced by new red blood cells, and there some substances or metabolites are formed in the process. One of them is bilirubin, a waste material that needs to be eliminated as soon as possible through the bile.
Bilirubin is not only a powerful dye. It is also a toxin for other tissues and stimulates nerve terminals in the skin when it is accumulated in the form of jaundice. Thus, jaundice usually comes along with itching because the same bilirubin tainting the skin also stimulates nerve terminals.