Darwin's theory of evolution was essentially ecological; he postulated that the organisms that will survive to reproduce are those which are best adapted to their environment. Ecologists are concerned with how organisms adapt to their environment in order to survive. The ecological functions of an organism are said to constitute its niche. For example, an insect may be a predator, but it may not prey on organisms much larger or much smaller than itself. Also, diurnal predators normally do not capture organisms that are nocturnal or that live in habitats unsuited to the predator.

Many ecologists are proponents of a principle called competitive exclusion, which states that each niche can be occupied by only one species, because when a required resource is limited and two or more species compete for it, one of the species will be eliminated unless it can evolve to occupy a slightly different niche.