May not spread. Pyelonephritis is not known to spread from person to person usually.
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.
See below. Pyelonephritis is usually a bacterial infection in the kidney usually bacteria come from the bladder, and there are other causes the bacteria can spread to the blood stream and causes systemic blood infection.