Zooxanthellae and their cnidarian (all (little) beasts with stinging cells) hosts live in mutualism, meaning they live in close contact and both reaping benefit from the association.
By defining the group, we must realize that this is a paraphyletic group. Various algae and other organisms have been grouped in this group “for convenience”. The word xanthos is Greek for yellow, you add zoo and with some degree of imagination, you have a working word. This describes the color that is characteristic for some “algae”, the dinoflagellates, from where the soon to be famous Symbiodinium comes from. I will use the term algae from now on, but I realize these are not algae per se.
These algae can be found in various groups of animals. Predominantly in cnidarians (corals, sea anemones, gorgonians…), but also in foraminiferans, radiolarians, ciliates, sponges, bristle worms, flat worms, mollusks (the famous giant Tridacna clams) and tunicates.
Zooxanthellae can get transferred to the host by at least two means – horizontal transfer, where they’re ingested from the water column or vertical, where the zooxanthellae are passed on from parents to their offspring.
Zooxanthellae live inside the host cells in special vacuoles. Exchange of gases and molecules is done by diffusion. Zooxanthellae are exposed to light, which powers their photosynthetic apparatus (made from chlorphyll) and form simple sugars. They pass at least some of these sugars to their host, and, in return, get some of the juicy metabolites that were meant to be thrown away (talk about one man’s garbage…). This is a source of carbon and other nutrients for the zooxanthellae.
Photosynthesis is very important for algae as well for the coral. When photosynthesis is running, major part of calcification of coral skeleton is taking place. The mechanism of calcification is far from certain, and various authors have introduced different models based on their results. A lot of work on transporters across the cells are done pharmacologically by various poisons. A lot of stuff in science is done by disfunction. To put it another way, you kill “something” (usually the target molecules of the poison is known) and see what happens.
Corals can form various pigments to protect their and algal cells from harmful sunlight (think UV light). This results in sometimes breath taking colors on coral reefs. Some pigments can be used for harnessing the light energy at different wavelengths, which gives corals another edge, because it enables them to colonize deeper waters.
When things become unfavorable, a host can expel some (all?) of the algae. This is probably because the algae are more sensitive to damage (by light, for example), and the process of dying forces the coral to dump the algae before they can cause any more damage to their cells. Coral bleaching has become a real problem in the past few decades. Most scientists contribute this “plague” to the elevated sea water temperatures (global warming, El Niño…). Animals losing the algae can recover, but the prognosis for such animals is dire. Dying corals mean direct shift in composition on coral reefs, which can have unforeseeable consequences on local, regional and, eventually, global scale.