During a urinary tract infection, the urine becomes infected with pathological germs and bacteria, which can cause the urine to have a distinctive smell. The smell is often described as fishy.