The earthworm shown above is a hermaphrodite. This means that it has both female and male reproductive parts. Either the hermaphrodite is first born with one set of parts and switches to the other set at some point in its life, or it is born with both sets of reproductive organs. Earthworms have both female and male organs (testes and ovaries). Earthworms have a way of preventing themselves from accidentally self fertilizing, though. Also, being a hermaphrodite could be an adaptation in order to get a better chance of mating. Every worm this earthworm encounters could be its mate, no matter what the gender.