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 it, 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 of these are consumer-resource systems. It can often be difficult to separate various types of feeding behaviors. For example, some parasites prey on their host and then lay their eggs on it, for their offspring to feed on it while it continues to live, or on its decaying corpse after it has died. The key characteristic of predation is the predator's direct impact on the prey population.
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 include grouping by trophic level or diet, by specialization, and by the predator's interaction with prey.