The surgeon will make every effort to get the infection under control and save the implant. If this doesn't work then the implant may have to be removed. At this point treatment is still focused on clearing up the infection.
A revision surgery may be possible. After the implant is removed and the infection is under control, then a second implant may be inserted into the joint. If this is not possible, then a fusion may be needed.
With a fusion or knee arthrodesis, the patient can still put weight on that leg and walk but motion is very restricted. Getting in and out of a car or on and off a bus can be very difficult. Sometimes the surgeon has to shorten the leg so the patient can swing the leg through when walking.
Knee arthrodesis isn't ideal but it does save the leg.