Not always, but there is a high correlation.
UTIs (urinary tract infections) are caused by bacteria that enter the urinary tract and cause inflammation and infection. UTIs are very common- more than 50% of women will have at least one in their lifetime. Most UTIs are relatively benign and can be easily treated with antibiotics, but some can be serious and lead to life-threatening complications.
UTIs are not classified as STDs (sexually transmitted diseases), but there is a high correlation between UTIs and sexually active people. This is because the bacteria that cause UTIs can be spread from the rectum to the urethra during sexual contact. Sexually active people are also more likely to have a weakened immune system and bacteria may be able to flourish in the urinary tract. Additionally, spermicides and diaphragms can increase a person's risk of developing a UTI by altering the natural balance of microbes in the vagina or urethra.
While there is an increased risk of UTIs for sexually active people, it doesn't mean that everyone who is sexually active will develop a UTI. Other factors such as hygiene, the type of sexual activity someone engages in, and the frequency of sexual activity can all play a role in whether or not someone gets a UTI. Good hygiene practices before and after sex can help reduce the risk of getting an infection. Additionally, drinking plenty of water and avoiding tight clothing can help reduce UTI risk.
Although UTIs are more common in women, they can occur in men as well. And while some UTIs may be caused by sexually transmitted infections (STDs), many are not. In fact, most UTIs are caused by bacteria that enter the urinary tract through the skin around the anus or genitals.
So no, a UTI is not automatically an STD, but some UTIs may be caused by STDs.