Coral reefs are diverse underwater ecosystems formed over millions of years by corals secreting calcium carbonate. They occupy less than 1% of ocean area but are home to 25% of marine species. Coral polyps secrete limestone shells and rely on algae called zooxanthellae for food, allowing reef growth. There are two main reef types - fringing reefs near shore and barrier reefs separated from land by lagoons. Coral growth requires warm, clear, sunlit water at optimal depths between 20-40 meters with normal salinity and gentle waves.