Through the blood
Pyelonephritis is an infection of the kidney/urine
collecting system. The kidney filters the blood of impurities and passes them out in the urine.
However, the filtration mechanism is delicate and an infection in the urine can readily cross the filter into the blood stream. Once in the blood stream, the infection can get everywhere quickly. Much more difficult to clear those infections.