The liver might be seen as a large factory. It manufactures, stores, modifies and breaks down all sorts of substances.
Substances that enter the blood via the intestines must therefore pass through the liver first. If necessary, they can be ‘processed’ there. Substances that are harmful to the body, such as drugs, are broken down or converted by the liver. Substances that the body will need later can be stored in the liver. Some substances are activated after passing through the liver. They have what you call active metabolites.
Often the liver cannot process all the substances in a single round. Blood will have to pass through the liver several times before substances such as drugs are fully processed. The number of times can depend on the kind of substance.