How natural selection worksWatch
During reproduction, some offspring will have mutations. These mutations are not superpowers, but small things (most of the offspring will be rejected by their host).
In a colony of bacteria, a small number will be resistant to things. Say this colony was exposed to an antibiotic. All of the bacteria, except the resistant ones, will be killed by it. These are resistant due to mutation. From here, these bacteria reproduce, and all of them will be resistant to the antibiotic.
Due to this process, many antibiotics are not used without good reason, so 'superbugs' dont develop.
You should look up Lamark's theory (note that its not actually correct).
Hope that I helped.
SURVIVAL: Some mutations are useful to the organism, as pointed out by EGIK, others can be harmful. Here we are concerned with useful ones. If the mutation gives the organism an advantage in adapting to the environment compared to other peers who do not have the mutation, then the former are likely to outlive the latter.
PASSING ON OF GENES: These surviving members of the polpulation will pass on their advantageous mutated gene to progeny (next generaion) so that after hundreds/thousands of years, the majority of that population/species will have that useful characteristic (phenotype).
This is known as survival of the fittest, and is the basic mechanism of evolution, the credit for which is attributed to Charles Darwin.
EXAMPLE: In tropical Africa, some people have an abnormality due to a mutation which gives them a state known as thalassemia trait. This mean they are carriers of one allele (one half of a gene locus or place) of an abnormal gene (those who have two alleles of this gene suffer a blood disorder). However, these people have the benefit of being resistant to malaria, so they generally have a greater chance of living longer. Therefore, through "survival of the fittest" [in this case being partly immune to malaria], there are increasing percentages of these people with time.
Individuals in a population have great reproductive potential and yet the numbers in a population remain roughly constant/stable. This is because many die due to environmental factors and therefore do not reproduce. There is variation amongst members of a population and those with the features best adapted to the environment survive. They reproduce and pass on their alleles to their offspring. This may lead to a change in the gene pool of the population and over time may lead to evolutionary change.