As you age numerically, so too does your skeletal structure and cartilage within your joints. Cartilage is the cushioning between two bones designed to absorb mechanical loading forces as you walk, jog, etc. Cartilage over the years will wear thin, leading towards Osteoarthritis, and in advanced cases, Knee and Hip replacements.
Total replacements of your knee or hip joint involve surgical intervention whereby an artificial joint replaces your naturally 'worn out' joint. These surgeries are hugely successful and you are usually walking the day after surgery.
It is important following surgery to get some guidance from a Physiotherapist to rehabilitate the strength of the muscles surrounding your knee and also to regain full movement.