The endosymbiotic theory is the scientific explanation for the origin of eukaryotic cells, which are complex cells with a nucleus. It suggests that these cells evolved from a symbiotic relationship between different species of prokaryotic cells (simple cells without a nucleus).
According to the theory, larger prokaryotic cells engulfed smaller prokaryotic cells, which were capable of photosynthesis or respiration. Instead of being digested, the smaller cells survived and became integral parts of the larger cells. Over time, these engulfed cells evolved into organelles, such as mitochondria and chloroplasts, which are essential for energy production in eukaryotic cells.
Ultimately, the endosymbiotic theory explains how simple cells evolved into the more complex cells that make up plants, animals, and fungi.