They happen when bacteria — often from the anus, dirty hands, or skin — get into the urethra and travel to the bladder or other parts of the urinary tract. UTIs are not sexually transmitted and are not contagious. This means that people with a UTI will not pass on a UTI to their partner.