Endosymbiosis

Endosymbiosis occurs when a symbiont lives inside the body or the cells of another organism. It is a very widespread phenomenon in living things.
Examples are:
Eukaryote theory.
Endosymbiont theory is the idea that eukaryote cells arose in evolution by the fusion of previously free-living protists (prokaryotes).p143 The theory was first suggested by the Russian botanist Konstantin Mereshkovsky in 1905. The nature of lichens had been worked out; mitochondria and chloroplasts had been seen in cells, and their similarity to bacteria noted. The theory was initially dismissed, but was re-examined when more was known about cell biology, by Lynn Margulis
The eukaryote cell is the type of cell all animals and plants are made of. Some cell organelles, such as mitochondria and chloroplasts, contain DNA. In each case, this DNA is thought to be the remnant of the genome of a once independent bacterium. The theory is that the eukaryote cell evolved by the fusion of several bacteria or archaean organisms. Together, the new cells survived, prospered and evolved into new and complex forms of life. The origin of other organelles in the eukaryotic cell is still under review: the cell nucleus, its membrane, chromosomes and centromeres; the Golgi body; the flagella or cilia; the intracellular membranes. Some of these may also have had a symbiotic origin. 
Examples:
Endosymbiosis in prokaryotes.
There is evidence that symbiosis happened between ancient bacteria to produce the double-membrane class known as gram-negative bacteria. Since the gram-negative bacteria include the cyanobacteria, this was the first of several such events in the history of the eukaryotes.