Urinary tract infections typically occur when bacteria enter the urinary tract through the urethra and begin to multiply in the bladder. Although the urinary system is designed to keep out such microscopic invaders, these defenses sometimes fail. When that happens, bacteria may take hold and grow into a full-blown infection in the urinary tract.
The most common UTIs occur mainly in women and affect the bladder and urethra.
Infection of the bladder (cystitis). This type of UTI is usually caused by Escherichia coli (E. coli), a type of bacteria commonly found in the gastrointestinal (GI) tract. However, sometimes other bacteria are responsible. Sexual intercourse may lead to cystitis, but you don't have to be sexually active to develop it. All women are at risk of cystitis because of their anatomy — specifically, the short distance from the urethra to the anus and the urethral opening to the bladder.
Infection of the urethra (urethritis). This type of UTI can occur when GI bacteria spread from the anus to the urethra. Also, because the female urethra is close to the vagina, sexually transmitted infections, such as herpes, gonorrhea, chlamydia and mycoplasma, can cause urethritis.