Omnivores, which eat both plants and animals, are usually generalists. Herbivores are often specialists, but those that eat a variety of plants may be considered generalists. A well-known example of a specialist animal is the koala which subsists almost entirely on eucalyptus leaves. The raccoon is a generalist because it has a natural range that includes most of North and Central America, and it is omnivorous, eating berries, insects, eggs and small animals.
The distinction between generalists and specialists is not limited to animals. For example, some plants require a narrow range of temperatures, soil conditions and precipitation to survive while others can tolerate a broader range of conditions. A cactus could be considered a specialist species. It will die during winters at high latitudes or if it receives a lot of water.
When environmental conditions change, generalists are better able to adapt, while specialists tend to fall victim to extinction much more easily. For example, if a species of fish were to go extinct, any specialist parasites would also face extinction. On the other hand, a species with a highly specialized ecological niche is more effective at competing with other organisms. For example, a fish and its parasites are in an evolutionary arms race, a form of co-evolution, in which the fish constantly develops defenses against the parasite, while the parasite in turn evolves adaptations to cope with the specific defenses of its host. This which tends to drive the speciation of more specialized species provided conditions remain relatively stable. This involves niche partitioning as new species are formed, and higher biodiversity.