Adaptation is a genetically encoded product of natural selection that enables a species to develop a functional feature that helps to ensure its survival. As a species' environment changes in time, natural selection works with a population's genetic variability to produce offspring with differing characteristics. Those offspring possessing the characteristics best suited for survival are the ones that will go on to produce similar offspring, while those less-suited to survival eventually die off.
The members of a species' population that are able to reproduce to a greater degree are able to pass on the genes containing advantageous functional adaptations to future generations. Those that reproduce less, possibly as a result of lacking the functional adaptation gene, will not be able to pass on their less-adaptive genes to succeeding generations in great numbers. This causes the species population to change as generations progress.
Feathers are an example of genetic variability and natural selection working together to produce a functional adaptation. Birds inheriting the gene that produces feathers were able to fly and were better suited to survival. Those that did not were unable to fly and did not survive. When a species' habitat changes, the resident population may move to another environment better suited to it, or it may instead develop an adaptation that enables it to survive in the altered environment. If neither of these changes occur, there is a possibility of the species becoming extinct.