All populations are limited by density dependent factors. These factors such as food, water, light etc are not unlimited. Thus, a population will grow until it reaches the maximum number of individuals the ecosystem can sustain.
In the beginning, at low population densities, it is more advantageous for an organism to have a clumped distribution. More individuals in one place will reduce the predation risk as well as increase the chances to find a mate and reproduce. When sufficient numbers are reached, a uniform distribution is more advantageous as the organisms can exploit the maximum amount of the ecosystem's resources. Furthermore, in case of an unexpected disaster, the overall population will be safe as the species is spread in all parts of the ecosystem.
There are two different types of reproductive strategies: K and r.
The K-strategists live in more stable environments, are more energy efficient, bigger and better protected. However, their growth and reproductive speed is slow as they produce a few progeny with high probabilities of survival.
The r-strategists are the opposite of K-strategists. They live in unstable and unpredictable environments where they are capable of rapid reproduction. Their offspring are numerous but weak with a high mortality rate. They produce as many offspring as possible to that at least some will survive and reproduce. These organisms also have sort life spans, are small and quick to mature. They are very energy wasteful.
R-strategists go through large variations in their population numbers. However, they are also capable of quickly recovering from potential catastrophes. The best survival strategy would be a combination of both r and K. At clumped and low population densities, a reproductive strategy that leans towards r would ensure that the ecosystem is quickly colonized. However, once the organism is spread uniformly, a K strategy is more advantageous as it is more stable and poses less risk to deplete the energy resources of the ecosystem.
An unicellular organism capable of both asexual and sexual reproduction would be a good example. At low population densities, asexual reproduction is the fastest method. Smaller identical offspring would ensure a fast colonization of the ecosystem. However, at higher densities, sexual reproduction can be used instead. Larger, longer lived and better protected individuals will ensure a more stable population.
Asexual reproduction means that all the individuals are more or less identical and thus more sensitive to potential pathogens. Sexual reproduction ensures genetic variation and thus more resistance against pathogens or new environmental changes.