What are causes of Urinary Tract Infections?

Sally
I went tovthe ER this morning from kidney pain and they said i have a UTI. What are causes of uti's?? Im 18 years old.