Castration is any action , surgical , chemical , or otherwise , by which a male loses the functions of the testes or a female loses the functions of the ovaries . Castration ( also referred to as gelding , spaying , neutering , fixing , orchiectomy , oophorectomy ) is any action , surgical , chemical , or otherwise , by which a male loses the functions of the testicles or a female loses the functions of the ovaries .