Parasitism
Parasitism is one version of symbiosis ("living together"), a phenomenon in which two organisms which are phylogenetically unrelated co-exist over a prolonged period of time, usually the lifetime of one of the individuals. The requirement for a prolonged interaction precludes predatory or episodic interactions (such as a mosquito feeding on a host), which are usually not seen as symbiotic relationships. Symbiosis encompasses commensalism ("eating at the same table", wherein two organisms co-exist in the same space, and one organism benefits while neither harming nor helping the other), through mutualism (wherein both species benefit from the interaction) to parasitism, wherein one organism, usually physically smaller of the two (the parasite) benefits and the other (the host) is harmed. (Various forms of "social parasitism", kleptoparasitism, and "cheating parasitism", as discussed below, are characterized by a less close association between a parasite and a host, however.) Especially in the field of medical parasitology, the term "parasite" has come to mean a eukaryotic, pathogenic organism. Thus, protozoan and metazoan infectious agents are classified as parasites while bacteria and viruses are not. Fungi are not discussed in textbooks of medical parasitology even though they are eukaryotic. They are saprophytes.

# Classification
Parasites that live inside the live body of the host are called endoparasites (e.g., hookworms that live in the host's gut) and those that live on the outside are called ectoparasites (e.g., some mites). An epiparasite is a parasite that feeds on another parasite. This relationship is also sometimes referred to as "hyperparasitoidism", especially in the insect world. For example a wasp or fly larva may be an endoparasite of an Ichneumon wasp larva, which is in turn an endoparasite of a wood-boring beetle larva. Therefore the ovipositing adult female hyperparasitoid must find the host of her host, namely the beetle larva, and oviposit into that beetle larva, after which her egg hatches within the beetle larva and seeks out the Ichneumon larva, ultimately burrowing into it and becoming an endoparasite. It is most likely that in this case, the ovipositing female adult hyperparasite locates the beetle larva by chemical cues it emits as a result of being parasitized itself by the Ichneumon wasp larva.
Many endoparasites acquire hosts by gaining entrance to their tissue; others enter the host when it consumes certain raw foods, as in the case of the nematode Ascaris lumbricoides, an endoparasite of the human intestine. A. lumbricoides produces large numbers of eggs which are passed from the host's digestive tract and pancreas into the external environment, relying on other humans to inadvertently ingest them in places without good sanitation. Ectoparasites, on the other hand, often have elaborate mechanisms and strategies for finding hosts. Some aquatic leeches, for example, locate hosts by sensing movement and then confirm their identity through skin temperature and chemical cues before attaching.
Parasitoids are parasites that use another organism's tissue for their own nutritional benefit until the host dies from loss of needed tissues or nutrients. Parasitoids are also known as necrotroph.
In contrast, biotrophic parasites cannot survive in a dead host and therefore keep their hosts alive. Many viruses, for example, are biotrophic because they use the host's genetic and cellular processes to multiply.
Some parasites are social parasites, taking advantage of interactions between members of a social host species such as ants or termites to their detriment. Kleptoparasitism involves the parasite stealing food that the host has caught or otherwise prepared. A specialized type of kleptoparasitism is brood parasitism, such as that engaged in by many species of cuckoo. Many cuckoos use other birds as "babysitters"; cuckoo young are raised and fed by adults of the host species, but adult cuckoos fend for themselves.
Cheating or exploitation types of parasitism are often found in situations where there are generalized non-specific mutualisms between broad classes of organisms, such as mycorrhizal relationships between plants and many types of fungi. Some myco-heterotrophic plants behave as "mycorrhizal cheaters", establishing mycorrhiza-like interactions with a fungal symbiont, but taking carbon from the fungus (which the fungus, in turn, gets from other plants) rather than donating carbon.

# Evolutionary aspects
Biotrophic parasitism is an extremely successful mode of life. Depending on the definition used, as many as half of all animals have at least one parasitic phase in their life cycles, and it is also frequent in plants and fungi. Moreover, almost all free-living animals are host to one or more parasite taxa.
The hosts of parasites often evolve elaborate defensive mechanisms as well. Plants often produce toxins, for example, which deter both parasitic fungi and bacteria as well as herbivores. Vertebrate immune systems can target most parasites through contact with bodily fluids. On a behavioral level, the itching sensation, and resulting scratching behavior is used to fend off parasites. Many parasites, particularly microorganisms, evolve adaptations to a particular host species; in such specific interactions the two species generally coevolve into a relatively stable relationship that does not kill the host quickly or at all (since this would be detrimental for the parasite as well).
Sometimes, the study of parasite taxonomy can elucidate how their hosts are similar or related. For instance, there has been a dispute about whether Phoenicopteriformes (flamingos) are more closely related to Ciconiiformes (storks and related groups) or to Anseriformes (waterfowl and allies). Flamingos share parasites with ducks and geese, so these groups are thought to be more closely related to one another than either is to storks. Modern DNA methods, however, have shown that flamingos are not closely related to Anseriformes either.
It is important to note that "benefit" and "harm" in the definition of parasitism apply to lineages, not individuals. Thus, if an organism becomes physically stronger as a result of infection but loses reproductive capabilities (as results from some flatworm infections of snails), that organism is harmed in an evolutionary sense and is thus parasitized. The harm caused to a host by a parasite can take many forms, from direct pathology, including various specialized types of tissue damage, such as castration, to more subtle effects such as modification of host behaviour.