Osteotomy is a surgical procedure that involves cutting and reshaping bones to correct alignment and relieve pain, often used in joint preservation and deformity correction. It is commonly performed on the knee or hip to treat conditions such as osteoarthritis or congenital bone deformities, aiming to improve function and delay the need for joint replacement surgery.