It depends on the intrinsic properties of the drug and the route
of administration. Oral drugs are often absorbed from the GI tract
into the hepatic portal vein, undergo first pass, and then reach
the systemic circulation.
They can be biotransformed (metabolized) in the liver, kidneys
or even lungs. Most drugs are excreted by the kidneys into the
urine, but some are excreted into bile by the liver.
Blood flow to particular organs, and the relative lipophilicity
of the drug affect how it will behave in the body. It's metabolism
is also key in figuring out how it will be excreted.