The anaerobic cell engulfed the aerobic cell, creating a mutually beneficial relationship; anaerobic ingests food & protects and aerobic handles the toxic oxygen. The result: a double-membrane organelle with a mitochondria (originally aerobic bacteria).
Margulis reasoned that organelles would have DNA that resembled bacterial DNA and be different from the cell's DNA meaning prokaryotes are parent to the eukaryotes. This was proven to be the case in the 1980's with mitochondria, chloroplasts and centrioles.
Later, the host cell engulfed another prokaryotic cell, the photosynthetic cell, but this one was capable of photosynthesis. When these two combined, this created chloroplast inside the host cell.
When the anaerobic cell (host cell) engulfed the aerobic cell, it not only created the mitochondria, it also gave itself the ability of aerobic, or cellular, respiration.
All of this information means that because of the endocytosis that took place, cells are now able to perform cellular respiration and at times, photosynthesis.
And there you have it, ladies and gentlemen... a complex yet simple explanation of our great great x100 ancestors. I may have explained but not without the help of evolution itself!