Normally, urine is sterile. Most infections are caused by gut bacteria that travel up the urethra into the bladder: this is cystitis, which causes burning and frequent urination, without fever. In women, the urethra is short, which is why cystitis is more common.
If the bacteria keep climbing through the ureter to the kidney, the infection becomes pyelonephritis: fever, chills and back pain. It must be treated the same day.
In the diagram: A cystitis (bladder infection) · B pyelonephritis (kidney infection, with fever)
1 Kidney · 2 Ureter · 3 Bladder · 4 Urethra · 5 Bacteria