The Theory of Endosymbiosis (also known as Symbiogenesis) explains how eukaryotic cells originated from prokaryotic cells. Eukaryotic cells are more complex than prokaryotic cells and contain a membrance bound nucleus, mitochondria and other organelle that are missing from the more simplistic prokaryotic cell.
According to the theory of endosymbiosis, the complex oragnelles present in eukaryotic cell, such as mitochondria and plasmids (such as chloroplast), were originally free-living bacteria and through the process of evolution converted into these complex organelle, about 1.5 billion years ago. The scientific evidence suggests that the mitochondria was originally proteobacteria and chloroplast was cyanobacteria.
The theory was originally postulated more than a century ago when scientists observed that division of chloroplast in green plants is similar to the division of cyanobacteria. Since then, microbiological and biochemical evidence has substantiated this theory.