An operation in which a diseased joint is surgically repaired, often with the help of an artificial replacement.