Endosymbiosis refers to a phenomenon where one organism lives inside the cells or body of another organism. Here, lives is meant to indicate a long term relationship between the organisms. The organism living inside the other is termed the endosymbiont and the other organism is termed the host.
Typically, the nature of relationship between endosymbiont and host is beneficial to at least one of the two, and in many cases it is beneficial to both. An endosymbiotic relationship that harms the host is endoparasitism. Some people restrict the term endosymbiosis to mutually beneficial relationships only, though this is not strictly part of the definition.
Some endosymbiotic relationships are obligate: either the endosymbiont or the host is dependent upon the symbiotic relationship for its survival.