Sympatric speciation is the process through which new species evolve from a single ancestral species while inhabiting the same geographic region.
For example, 200 years ago, the ancestors of apple maggot flies laid their eggs only on hawthorns — but today, these flies lay eggs on hawthorns (which are native to America) and domestic apples (which were introduced to America by immigrants and bred). Females generally choose to lay their eggs on the type of fruit they grew up in, and males tend to look for mates on the type of fruit they grew up in. So hawthorn flies generally end up mating with other hawthorn flies and apple flies generally end up mating with other apple flies. This means that gene flow between parts of the population that mate on different types of fruit is reduced. This host shift from hawthorns to apples may be the first step toward sympatric speciation — in fewer than 200 years, some genetic differences between these two groups of flies have evolved.