Natural selection states simply that the frequency of inherited traits that help an organism to survive tend to increase over the generations in a population. Similarly the frequencies of inherited traits that reduce the probability of an organism surviving tend to reduce over the generations. This is a tautology and inevitably true. Natural selection can happen in any situation where something reproduces and passes on its traits. Charles Darwin and Alfred Russell Wallace developed this idea independently. Natural selection affects the genes of living organisms.
Over time natural selection causes populations to differentiate as they adapt to new environments. Gradually new subspecies and new species are formed. This is known as the Theory of Evolution by natural selection.
In a slightly different way natural selection also affects Memes, which are ideas that people copy and pass on to other people - or more correctly ideas which cause people to copy them and pass on.