How long does it take for UTI to go away without medications?

Depends on bacteria. Mild UTI and asymptomatic UTI may resolve spontaneously. Uti may clear easily if appropriate antibiotic is used in the right dose. Pseudomonas may be difficult to treat.
It may not! The reason we treat urinary infections is because they don't easily resolve, and can lead to more serious infections, as well as damage to the urinary tract. People who think they have a UTI should be evaluated and treated promptly.