There are two ways in which coral reefs grow.
First, they grow by secreting more limestone around the base of their cup. This creates the limestone skeleton that grows outward and upward.
Second, some coral polyps reproduce new polyps by creating clones using asexual reproduction, while others procreate sexually using eggs and sperm.
more on curiosity.com