When the lining of the knee is worn out it is called arthritis. This can result from age, injury, complete removal of meniscus, obesity, malalignment of the leg, rheumatoid arthritis etc. This can cause pain, swelling, giving way, inability to walk/run comfortably and in late stages pain at night affecting sleep.
Most patients are managed by painkillers, physio, weight loss, injections of Hyaluronic acid (Durolane), moderation of physical activity. In those who have sudden pain they may have a torn cartilage and benefit from Arthroscopy. Malaligned knees may benefit from Osteotomy and finally if all else fails a Total Knee Replacement (replacement of the worn lining by a metal on plastic knee with preservation of most of the bones and ligaments)
Read more about Knee arthritis on the OrthInfo website