Reef-building corals have a symbiotic relationship with photosynthetic algae called zooxanthellae, which live in their tissues. The coral provides a protected environment. In return, the algae produce carbohydrates through photosynthesis that the coral uses for food, as well as oxygen. The algae also help the coral remove waste.
Many types of algae, seaweed, sponges, sediment, and even molluscs like giant clams and oysters add to the architecture of coral reefs. When these organisms die, they also serve as foundations for new corals.