How to Prevent Urinary Tract Infections Most urinary tract infections (UTIs) are caused by bacteria that live in the digestive system. If these bacteria get into the urethra (the tube where urine comes out), they can cause infection. Your treatment will depend on whether your infection is in the upper or lower urinary tract. Both types of urinary …