Endosymbiotic theory postulates that certain organelles in eukaryotes originated as separate unicellular organisms like bacteria that were engulfed into an existing cell to become what is called an endosymbiont. They were eventually incorporated as a part of the cell as an organelle. Two organelles widely believed to have originated as separate cells in this way are mitochondria and chloroplasts.
Endosymbiotic theory was first proposed in the early 20th century, but it wasn't until the later part of the century with advances in DNA sequencing and mapping that true evidence began to emerge. Some proof for this theory lies in the fact that certain membrane associated proteins like porins and cardiolipin are found in only bacterial cell walls and mitochondria and chloroplast membranes. Also, a simplified form of DNA called circular DNA is found in both of these organelles and also in bacteria cells. This type of DNA is different from that found in the eukaryotic nucleus. Finally, both of these organelles are formed through a process similar to binary fission, which is how bacteria cells reproduce.