By developing such complex patterns of behavior it has enabled these wonderful species to coexist. Coral reproduction varies depending on the species. Some species such as brain coral or star coral are hermaphrodites , producing both sperm and eggs at the same time. Other coral species such as Elkhorn coral or boulder coral produce single-sexed colonies. Thus, all of the polyps in one colony produce only sperm and all of the polyps in another colony produce only eggs.
Corals reproduce both sexually and asexually .
In most species, the egg and sperm are released into the water where random fertilization occurs, resulting in a baby planula larva . This process is called coral spawning . The larva is naturally attracted to the light and swims to the surface of the water where it remains for several days or even weeks. If the larva manages to avoid being eaten by predators, it eventually returns to the bottom of the ocean floor. Here it attaches itself to a hard surface and becomes a coral polyp.