Separation of rainforest leads to new environment faced by the single species that have been separated. New environment means new selection pressures (predation, resources etc..) and this leads to natural selection acting on the species leading to the naturally advantageous phenotype and reproducing, thereby also passing on their genes to future offspring. Eventually as these alleles and mutations accumulate, it leads to speciation occurring. When the new species interbreed they are unable to produce any offspring, but even if they are, the offspring will not be fertile and viable.