In his seminal book, Origin of the Species, Charles Darwin proposed a mechanism of evolution which subsequent scientists have found substatially correct, although it has been developed in details.
Darwin proposed that species evolved by a combination of two processes, random mutation and natural selection. Random mutation occurs in organisms`DNA, the molecular chains that carry the genetic code. Mutations in cells involved in the reproductive process can be passed on to offspring. If the mutated gene is dominant, the characteristic determined by the mutation will appear in offspring, but if the gene is recessive, it will merely be passed down to future oiffspring and only appear if the second parent possess that gene as well.
Mutations which enable an organism to reproduce better or compete more successfully for resources make it more probable that the organism will survive. Thus the fittest mutations for survival are likely to be passed down. Over many generations, successive minor changes caused by random mutation and selective survival patterns lead to differences so great that the descerndents would be incapable of interbreeding with the original species, thus fitting the biological defininition of a new species.