Castration, gelding, neutering, orchiectomy or orchidectomy is any action, surgical or otherwise, by which a biological male loses use of the testes. This causes sterilization, i.e. prevents them from reproducing; it also greatly reduces the production of certain hormones, such as testosterone. It should not be confused with penectomy, which is the whole or partial removal of the penis.
The term "castration" is sometimes also used to refer to the removal of the ovaries in the female, otherwise known as an oophorectomy or, in animals, spaying.
Castration in humans
Castration was frequently used in certain cultures, such as in the Middle East, India, Africa or China, for religious or social reasons. People who receive this treatment, known as eunuchs, were often admitted to special social classes. Eunuchs were also often used to guard harems. Castration has also figured in a number of religious cults: see castration cults. Other religions, for example Judaism, were strongly opposed to the practice.
In Europe, when women were not allowed to sing in public, castration was sometimes used on young boys to prevent the breaking of their voice (caused mainly by testosterone) and to let them develop a special high voice. These men are known as castrati.
Remains of transsexual women or transgendered people from far back as the Ancient Romans have been uncovered and confirmed to have undergone castration.
Castration in humans has been proposed, and sometimes used, as a method of birth control in certain poorer regions.
Surgical removal of a testicle is done in the case of testicular cancer. Surgical removal of both testicles or chemical castration may be carried out in the case of prostate cancer, as hormone treatment to slow down the cancer. 
Male-to-female transsexual women, as well as some transgendered people, often undergo castration. Castration can be done before, during, or in place of sex reassignment surgery.
A temporary chemical castration has been studied and developed as a preventive measure and punishment for several repeated sex crimes such as rape or other sexually related violence. Chemical or surgical castration is being discussed in many countries in particular as a voluntary surgical measure: an option for child molesters to avoid (long-term) imprisonment. In the case of chemical castration, regular injections of anti-androgens would probably be required. It should be noted that this treatment is not as effective as commonly believed, there have been cases of castrates going on molesting children.
There is also evidence that voluntary castration is used in modern societies for reasons such as control of libido, body modification, and in some cases of extreme sexual masochism, for purposes of sexual excitement (see paraphilia and apotemnophilia). Since voluntary castration is not generally supported by the medical community, an underground network of castrators (generally called "cutters") without medical licenses has formed. Surgery performed by untrained personnel outside a properly equipped medical facility is dangerous, and there have been cases of severe bleeding and other medical emergencies. Alternatively, self-castration (or autocastration) is occasionally performed, though it carries significant risk. Many who desire castration travel to developing countries, where medicine is less tightly regulated, and have the procedure performed by a doctor.
Involuntary castration also appears in the history of warfare, sometimes used by one side to torture or demoralize their enemies. It was also practiced to extinguish opposing male lineages and thus allow the victor to possess the defeated men's women. Involuntary castration under such circumstances involved excruciating pain and humiliation as well as various physical, social, and psychological consequences. Ancient Greek writings report Persian forces castrating defeated foes. Tamerlane was recorded to have castrated Armenian prisoners of war who had fought as allies of the Ottoman Sultan Bayezid I; others were buried alive. Gibbon's famous work, Decline and Fall of the Roman Empire reports castration of defeated foes at the hands of the Normans. More recently, the Vietcong were known to often castrate American prisoners of war, Vietnamese village elders, and others who opposed their policies.
The Heaven's Gate cult of Marshall Applewhite had several male members, including Applewhite himself, who underwent castration for religious reasons.
A subject of castration who is castrated before the onset of puberty will retain his high voice, slight build and small genitals, will not develop pubic hair, and will have a small sex drive or none at all.
Castrations after the onset of puberty will typically reduce the sex drive considerably or eliminate it altogether. Castrates can, however, still have erections, orgasms and ejaculations. The voice will normally not change. Some castrates report mood changes, such as depression or a more serene outlook on life. Body strength and muscle mass can decrease somewhat. Body hair may or may not decrease. Castration prevents baldness.
In China, male castration of a person who entered the caste of eunuchs under imperial times involved the removal of all genitalia, that is, the removal of the penis, testicles and scrotum. The removed organs were returned to the eunuch, to be interred with him once he dies, so upon rebirth, he could become a whole man again. The penis, testicles and scrotum were euphemistically termed as bau in Mandarin Chinese, which literally means 'precious treasure'. Consequently, eunuchs suffered from a range of urogenital problems associated with the removal of their sexual organs, and they had their own specialist doctors who catered to their health needs.
Castration In Veterinary Practice
Castration is common in animal husbandry and animal fancy, where it is intended for favouring a given desired development of the animal or of its habits.
In animal fancy
Usually domestic pets are subject to castration in order to avoid sexual frustration or sexual contacts and consequent reproduction. (In the case of pets, it is usually called neutering). breeding specimens are kept entire and fetch higher prices when sold.
In animal husbandry
In the food industry, cattle and other ruminants are often castrated in order to increase their weight and improve the taste of the meat (with the advantage of relevant economies of scale for the breeder). Male animals may also be castrated in order to make them more tractable.
A specialized vocabulary has arisen for neutered animals of given species:
Certain animals, like horses and swine, are usually treated with a scrotal castration (which can be done with the animal standing), while others, like dogs and cats, with a pre-scrotal castration (with the animal recumbent).
Methods of veterinary castration include surgical removal, the use of an elastrator tool to secure a band around the testicles that disrupts the blood supply, the use of a Burdizzo tool to crush the spermatic cords and disrupt the blood supply, pharmacological injections and implants and immunological techniques to inoculate the animal against its own sexual hormones.
Orthodox Judaism forbids the castration of either humans or animals.