Actually endosymbiotic theory (we should write "Endosymbiotic theory of origin of eukaryotic organelles") suggests a theory about only the eukaryotic organelles (mainly Plastid-family and Mitochondrion).
I'll divide my answer into 3 parts:
# Theory of archaeal origin of the eukaryotic host.
1. How Archaea (Archaebacteria) and Eukaryotes shared a closest common ancestor
# Endosymbiotic theory of origin of Eukaryotic cell organelle.
2. How mitochondria originated?
3.* How plastid was originated?
Please keep in mind, in origin and evolution of eukaryotes, origin of the host cell (and the nuclear genome) is a different event; and origin of eukaryotic organelles mitochondria and plastid is another different event.
Theory of archaeal origin of eukaryotic host
1. How Archaebacteria (archaea) and precursor of eukaryotes evolved from their nearest common ancestor.
It has been established (First by <PERSON>, mainly based on her prolonged researches on rRNA sequences) (PDF) (REFERENCE-1 *) that Eukaryotic "host cell" (with the nuclear genome) shares the closest common ancestor with Archaebacteria, not the eubacteria.
Further reading: Relationships of Eukaryotes and archaea
Fig-1: Here the horizontal axis is the time axis.
(The small black balls here indicating many other possible extinct lineages (hypothetical, just todemonstrate how evolution works) )
On other hand, After the group bacteria (eubacteria) developed (better to say the precursor of bacteria further diversified, bacterial groups like proteobacteria and cyanobacteria developed. For bacterial phylogeny, see Wikipedia (image)
Endosymbiotic theory:
Now endosymbiotic theory tells that the origin of some eukaryotic organelles (at least Mitochondria and Plastid) were different and distant taxa from the eukaryotic cessls, and they came from outside and entered into the cell and formed symbiotic relation; and the endosymbionts gradually lost their free-living ability, were gradually became part of host cell. The peculiarity of this "Endosymbiosis" phenomenomenon in evolution is that; not only the "parent" taxa; but another "distant taxa" merge from side of the lineage. The concept is not only confusing but it was so shocking that when <PERSON> first proposed this hypothesis, the idea was rejected. 29
Later on, genome-based research proven that the origin of mitochondria (and as we will see, plastids); were originated from mutualistic- symbiosis.
2. How mitochondria evolved in eukaryotes?
It has been suggested, the "precursor" of eukaryotes (which was descendant of closest-common ancestor with archaebacteria), the host cell, engulfed some aerobic eubacteria (perhaps allied to proteobacteria) those aerobic eubacteria gave rise to mitochondria. These derived protists were unable to photosynthesise. This endosymbiosis is very much similar to previous one.
Fig 2a: origin of the organelle mitochondria.
So our evolutionary tree now look like
Fig 2b: Origin of mitochondria in eukaryotes, placed in evolutionary tree.
The white balls here represent living and contemporary groups.
(Just like previous picture the extinct groups are hypothetical and representitive; but the relative positionsof clades for proteobacteria and cyanonbacteria is actual, and taken from from <PERSON>'s microbiology **)
(A common example of intracellular endosymbiosis will help us to understand the theory- we can still see such intracellular symbiosis in rhizobial bacteria colonising plant root/tissue; where we get both intracellular stage and culturable extracellular phase)
3. How Plastids evolved then?
From this group of protists, a certain group again engulfed a sort of eubacteria (allied to cyanobacteria). The cyanobacteria gave rise to plastids , and photosynthetic protists.
There are disputes about whether plastid and mitochondra evolved simultaneously or at an interval. According to <PERSON> they originated simultaneously, but according to other newer sources like this and this , mitochondria appeared first.
Fig.3.a. one lineage eukaryote that already formed mitochondria, forming another association with a photosynthetic eubacteria. 3