In an ecosystem, predation is a biological interaction where a predator (an organism that is hunting) feeds on its prey (the organism that is attacked). Predators may or may not kill their prey prior to feeding on them, but the act of predation often results in the death of the prey and the eventual absorption of the prey's tissue through consumption. Thus predation is often, though not always, carnivory. Other categories of consumption are herbivory (eating parts of plants), fungivory (eating parts of fungi), and detritivory (the consumption of dead organic material). All these consumption categories fall under the rubric of consumer-resource systems. It can often be difficult to separate various types of feeding behaviors. For example, some parasitic species prey on a host organism and then lay their eggs on it for their offspring to feed on it while it continues to live in or on its decaying corpse after it has died. The key characteristic of predation however is the predator's direct impact on the prey population. On the other hand, detritivores simply eat dead organic material arising from the decay of dead individuals and have no direct impact on the "donor" organism(s).
Selective pressures imposed on one another often leads to an evolutionary arms race between prey and predator, resulting in various antipredator adaptations. Ways of classifying predation surveyed here include grouping by trophic level or diet, by specialization, and by the nature of the predator's interaction with prey.
Classification of predators by the extent to which they feed on and interact with their prey is one way ecologists may wish to categorize the different types of predation. Instead of focusing on what they eat, this system classifies predators by the way in which they eat, and the general nature of the interaction between predator and prey species. Two factors are considered here: How close the predator and prey are (in the latter two cases the term prey may be replaced with host) and whether or not the prey are directly killed by the predator is considered, with true predation and parasitoidism involving certain death.