Hi and thanks for your question.
Bilirubin is a byproduct of the breakdown of red blood cells in the body. It is essentially a waste product and needs to be removed from the body. Normally, the liver changes the chemical structure of bilirubin to allow it to get out of the body. After it is processed by the liver, bilirubin is removed from the body primarily through the stool and a very small amount is excreted in the urine. If for some reason it cannot be removed, or removed quickly enough, it can build up in the blood and spill over into the urine.
When bilirubin is present in the blood or in the urine it may indicate some sort of dysfunction in the body. Common causes of bilirubin in the urine are biliary obstruction and hepatitis. Medications can also cause this.
Did you have a conversation with your doctor about this? Also, why did you get a urinalysis? Are you on any medications?