When explaining a breakup, couples will often say, "We grew apart," or "We both changed in different ways." That's a good metaphor for how species are formed: members of a population somehow begin to diverge, usually as a result of being geographically separated from each other. Eventually, they can no longer interbreed, and at that point a new species has formed.
Yet if the two groups continued to live near each other, it's likely that mating attempts between naturally varying members of the two populations would tend to allow the species to merge again. This is called "gene flow" between the two groups. What keeps this from happening, and what allows new species to arise and endure, are what are known as "isolating mechanisms." These are either behavioral or structural differences between species that make mating impossible.
Temporal or habitat isolation occurs when related but distinct species of organisms mate at different times of day, or exploit different habitats and resources, and therefore rarely encounter each other as potential mates. For example, eastern spotted skinks breed in winter, while western spotted skinks breed in summer.
Different firefly species use different flashing patterns to attract mates -- a form of sexual signaling. In animals with two sexes, the potential partners must signal when they are ready to mate or are receptive to mating. If the two species are "blind" to each other in this respect, mating won't occur. This is known as ethological, or behavioral, isolation. Colors, songs, and scented chemicals (pheromones) are common signals that bring mating partners together -- or keep them apart. In plants, the equivalent isolating mechanism is the pollination of different species by different pollinating animals: some of these pollinators are quite specific to structure, color, or scent.
Sometimes, the reproductive organs of a species are elaborately shaped and are only able to engage with those of same-species organisms. This "mechanical isolation" separates many species of dragonflies and damselflies.
Incompatible gametes divide some species of shellfish that deposit their sperm and eggs directly in the water. Even if the sperm and eggs of other species are also present, only those of the same species can gain access to each other. In one case, the sperm carries a specific protein that makes a hole in the egg's envelope, and no other proteins would be able to do that.
It is possible in some instances for members of two different species to mate and produce an offspring. If this occurs, "post-zygotic" isolating mechanisms usually ensure that the resulting "hybrid" offspring is much less vigorous than either parent species, and therefore unlikely to perpetuate itself. Many such hybrid offspring are completely sterile. The most familiar example of this is when a horse and a donkey interbreed to produce a sterile mule.