The hip joint is a "ball and socket" in which the upper end of the thighbone rotates inside a rounded area of the pelvis. The knee is a "hinge" that joins the shin to the thigh. Both joints are lined with cartilage, a layer of smooth, tough tissue that cushions the bones where they touch each other. With age and stress, the cartilage wears away, and the bones rub against each other, causing friction, swelling, stiffness, pain, and sometimes deformity. When this occurs, hip or knee replacement can relieve pain and restore mobility and quality of life.