It is the natural/genetic ability of an organism to avoid or repel attack by biotic agents (pests etc.) or to withstand the effects of abiotic agents example (chemicals).
Absorbing prokaryotic cells. This theory is called the endosymbiotic theory.
The early prokaryotic cells that were absorbed likely evolved into mitochondria and chloroplasts, membrane-bound organelles with their own DNA in single chromosomes and their own ribosomes.