Coral and algae live together in a type of relationship called 

mutualism
. In this type of relationship, 
both organisms
will benefit. In this case, the algae 
get a habitat
, and the coral 
. Because the two organisms 
, they could both 
if the algae are ejected from the coral.​​​​​​​

Because the algae provide the coral with nutrients through photosynthesis, the coral gets a source of energy. Because the coral provides the algae with a protected habitat, the algae are able to survive and reproduce. Because the two organisms depend on each other, they could both suffer if the algae are ejected from the coral.