The surgical removal of one or both testicles. It is a means to reduce the production of the hormone testosterone as part of the treatment for prostate cancer.