Evolution by natural selection explains how species become suited to their environment. It starts with variation. Within a population, individuals differ because of mutation, which is a random change in the DNA that can create a new allele. Most mutations have no effect on the phenotype, but occasionally one gives a phenotype that is an advantage in the environment.
Individuals are in competition for food, mates and space, and more offspring are born than can survive. Those with the phenotype best suited to their environment are more likely to survive and reproduce. They pass the advantageous allele on to their offspring in their genes. Individuals with less suitable phenotypes are less likely to survive and breed.
Over many generations the advantageous allele becomes more common in the population. Individuals do not change themselves to fit the environment. The change happens in the population, because mutations are random and the environment selects which variants survive.