In high school biology, we're taught that biological sex is a game of X and Y. Women have two X's, and men have one of each, X and Y. In recent decades, though, scientists have learned that things might not be so clear-cut. There are people whose biological sex can't be easily determined because they're born with both genitals or because the female presents with an XY and the male presents with the XX. People with congenital abnormalities that leave them unable to be classified as male or female are considered intersexual, a term which has come to replace the word "hermaphrodite" in humans.
In the plant and animal world, though, hermaphrodites aren't the atypical abnormalities they are in the human world. These species are evidence that there's more to biological sex than just genes and chromosomes -- sometimes, all it takes is an environmental factor to alter your sex and gender.
There are two kinds of hermaphrodites in the plant and animal world: simultaneous hermaphrodites and sequential hermaphrodites. Fish and gastropods make up the bulk of both types. Simultaneous hermaphrodites have both male and female reproductive parts for their entire life and can mate with any other member of their species they should find. That can be a huge reproductive advantage, because it's easy to have a large number of children -- your mating options are doubled, compared to humans.
Sequential hermaphrodites are born as one sex, but change completely into the other sex during the course of their lives. When something is born as a male, but becomes a female, it's called protandry, while protogyny refers to a female becoming a male. Anemonefish, or clownfish, are one of the most prominent examples of sequential hermaphrodites. These fish live with an anemone for most of their lives in a very hierarchal structure in which the sole female and the largest male do all the mating. When the female dies, the largest fish becomes a female, and she begins mating with the next male. Just as with the simultaneous hermaphrodites, this mating strategy is advantageous for reproduction, particularly since this fish never ventures very far from home.
Reproductive success and continued survival are the main reasons that species change sex. The change could also occur due to environmental factors or chemical triggers that scientists don't understand yet. Another thing scientists don't understand is why more species don't undergo the process of changing sex. In 2009, Yale researchers established that the benefits of sex change far outweighed the biological costs, for while rewiring a human to become the other sex would be tricky, it's quite simple for fish, frogs and plants [sources: Yale University, Tidwell]. However, it's possible that more species will start changing sex due to environmental factors. A 2004 report detailed the ways in which manmade pollution could affect the endocrine system of creatures like polar bears and alligators [source: Owen]. Because of the hormones in human waste and chemicals, these animals have experienced abnormal sex changes that have made breeding difficult.