I have pet algae? So why algae you ask? What happens is the bottle with the yucky foamy looking stuff is actually yeast mixed with water and sugar. The yeast feeds on the sugar and in turn, produces Carbon Dioxide(CO2). The CO2 then feeds through the tubing to the other large bottle which houses the algae. The algae feeds on the CO2 along with fertilizer. The small bottle is capturing oxygen that is released by the bottle containing the algae.
Algae Biodiesel Engineering: Extracting Oil from Algae - HowStuffWorks