Knee replacement surgery is most commonly performed to treat severe pain caused by osteoarthritis. People who need knee replacement often have trouble walking, climbing stairs, and sitting, and getting up from chairs. Some people have knee discomfort even while they are at rest.