A total hip replacement is a surgery that removes the ball of the upper thighbone (femur) and damaged cartilage from the hip socket. A metal ball is fixed solidly inside the femur in place of the original ball. The socket is replaced with a plastic or metal liner that is mostly fixed inside a metal shell. This creates a smoothly functioning joint that does not hurt.