The biological species concept tells us that organisms belong to the same species if they can breed to produce fertile and viable offspring. Speciation is therefore the development of reproductive isolation between individuals of an original population.
This can occur in 2 different ways:
1. Allopatric speciation. This is when speciation occurs due to some sort of geographic barrier separates a population into 2 groups. These two groups can then undergo genetic divergence, where each group grows increasingly dissimilar genetically due to random mutations and natural selection acting separately in each group, or from processes such as genetic drift. It is important to recognize that the lack of gene flow between these two groups contributes to the genetic divergence of the groups. Genetic divergence can lead to prezygotic and post-zygotic barriers which prevent production of fertile/viable offspring between the 2 groups. Each of these populations now represents a new species, whose gene pools are completely separate from one another.
2. Sympatric speciation. This is when speciation occurs without the presence of any sort of physical/geographical barriers. Truthfully, this is a much less common occurence. However, it is thought that sympatric speciation can occur as a result of strong divergent selection. Sympatric speciation may also occur as a result of a polyploid individual being introduced into a diploid population.
Isolation leads to speciation by preventing gene flow between 2 groups of an original population, allowing genetic differences between the groups to accumulate over time (via natural selection, genetic drift, etc.). Over time, the accumulation of these genetic differences may result in reproductive isolation between the 2 groups, causing these two groups to be committed to separate evolutionary paths.