Bacteria. Usually e. Coli is most common followed by a bunch of other bugs that live near the rectum/anus. Prevent with drinking water and urinating regularly. Treat with appropriate type and duration of antibiotics.
Ascending UTI. Infection/bacteria going up from bladder to kidney. Can be due to ciliated bacteria crawling up like mini caterpillars, or due to bladder valves allowing infected urine to reflux up to the kidney. U need an at least 2 week course of antibiotics with good tissue penetration & good tissue levels. Discuss with your dr. Asap.