Joint replacement surgery is usually recommended when non-surgical treatments such as medication, physical therapy, or joint injections have failed to relieve pain and improve function.