Pyelonephritis is an infection of the kidneys that occurs when a urinary tract infection spreads up from the bladder to one or both kidneys. It is caused by bacteria entering the urinary tract and ascending to the kidneys. Common symptoms include flank pain, fever, nausea, and painful urination. Diagnosis involves urinalysis, urine culture, and imaging tests like ultrasound or CT scan. Treatment is with antibiotics given orally or intravenously for several weeks to eliminate the bacteria and resolve the infection.