Most flatworms are hermaphrodites, which mean that they have both male and female organs.
Free-living flatworms reproduce asexually by fission. Flatworms have great ability to regenerate their damaged or lost parts of bodies. Sometimes, worms simply separate into pieces and each piece will grow into new worms. Parasitic flatworms do not reproduce asexually because their life cycle is more complicated than free-living flatworms.
During sexual reproduction, two worms join and one worm deliver sperm to the other worm while receiving sperm from its partner at the same time. With in a few weeks, eggs hatch in small clusters.
Some roundworms are hermaphrodites as well.
Unlike flatworms, roundworms have separate males and females. Fertilization occurs inside the body of the female.