Natural selection may or may not play a role in speciation. The genetic divergence of two populations can be entirely due to genetic drift, for example, with no role for natural selection.
We have also seen two ways in which natural selection can be involved in speciation. First, sympatric speciation requires some form of disruptive natural selection, as when hybrid offspring are competitively inferior. Second, allopatric speciation (and adaptive radiation) may be facilitated by natural selection. For example, when a peripheral population is in a new environment, natural selection will act to promote its adaptation to the new conditions, accelerating in the process the rate of genetic divergence between it and its parent population.