Your kidneys are sterile, and so is your urine while its still inside your body. It doesn't become infected with bacteria until it reaches the urethra. It then gets infected with bacteria that is on the outside of the body. A urinary tract infection usually comes from outside the body via the urethral opening, where a kidney infection usually comes from somewhere else within the body. A kidney infection is much more serious, but both need aggressive antibiotic treatment. The drug of choice depending on what the actual bacteria is thats causing the infection. Usually when you have a kidney infection it travels up to your urinary tract and causes a urinary tract infection as well.
In the tract it hasn't traveled up to the kidneys, and kidney, means that it has passed the track and is more dangerous, or can be if left untreated. Hope this helps.
There is a tube from each kidney which unite as one to form the urinary tract. When an infection is present in the tract it can travel upwards to either or both kidneys which is a more serious infection.