Speciation occurs through reproductive isolation over long periods of time. There are three main types of speciation: allopatric speciation which occurs when populations become geographically isolated; parapatric speciation at habitat borders; and sympatric speciation within the same habitat. Reproductive barriers like behavioral, ecological, and mechanical isolation prevent interbreeding and lead to the evolution of new species. Over time, small changes through microevolution accumulate into macroevolutionary changes between species.