The urinary system in it's simplest conception functions as our garbage disposal system. However, it's duties are many. It not only cleanses the blood of waste products of metabolism, but it also functions to eliminate foreign substances like prescription drugs.
Excretion begins with the kidneys.
The first stage of kidney processing of the blood is filtration of the blood. Large particles like red blood cells and large proteins remain in the capillary bed of the vasculature, while small particles dissolved in the plasma flow out of the blood and into the nephron. An accurate analogy to this form of processing is the use of a colander to strain the water from pasta. When you pour the pasta and water into the colander the water streams through, but the pasta remains behind. This process occurs after the blood has flowed through the glomerulus and is beginning its trek back to the heart.