Plasmodium and Toxoplasma are genera of apicomplexan parasites that infect millions of people each year. The former causes malaria, and the latter causes neurotropic infections associated with a weakened or developing immune system. These parasites harbor a peculiar organelle, the apicoplast. The apicoplast is the product of an ancient endosymbiosis between a heterotrophic and a photosynthetic protist. We explore the cellular and molecular mechanisms that enabled a stable union of two previously independent organisms. These include the exchange of metabolites, transfer of genes, transport of proteins, and overall coordination of biogenesis and proliferation. These mechanisms are still active today and can be exploited to treat parasite infection. They were shaped by the dramatic changes that occurred in the evolution of the phylum Apicomplexa--including the gain and loss of photosynthesis, adaptation to symbiosis and parasitism, and the explosion of animal diversity-that ultimately provided an aquatic alga access to every biotope on this planet.