There is a mutation in a gene that causes an organism to be different from the rest.
This leads to variation in the species. There are the X and the Y.
This gives some individuals the selective advantage Z.
The mutated organisms survive and reproduce because they can outcompete with the organisms without the mutation. The Y die and the X survive.
The mutated gene is passed onto the next generation, this repeats over many generations. The number of individuals with the mutated gene increases.
This is natural selection. This brings about evolutionary changes.