Organisms on Earth did not evolve in a homogenous environment. A critical part of speciation (when you go from a single species into two or more) is a reproductive barrier.
This can be a literal, physical barrier - mountain range appears between two populations, valley in the middle of habitat floods and isolates the two halves of the population, a small group is thrown by some catastrophe on a remote island and cannot escape, etc.
It can also be a genetic barrier: Imagine a bird species where males compete for mates with their bright blue crests, and rare mutations occasionally lead to red-crested males which cannot mate at all. If some female birds happen to mate with undesirable red-crested males for a few generations, two parallel sub-populations may develop: Birds which prefer red crests and bird which prefer blue crests. These populations may be very unlikely to interbreed.
There may be more complicated ways of erecting a barrier. For instance, a population of flowering plants that could previously interbreed arbitrarily may find that the ecosystem has experienced some crisis, and now the pollinating insects have become fastidious and only visit certain flowers and not others. Another example: While humans are currently a single species, because of culture (eg. language) certain human subpopulations (such as European nations) are much more likely to breed within themselves than between themselves.
Regardless of how the barrier comes to be, once a barrier can separate a species into sub-populations, the machinery of speciation is set in motion. All species evolve over time in different ways, especially if their environment does not have a very long history of unusual stability. As populations evolve, they try to stay somewhat coherent - the changes tend to be such that they still permit everyone in the population to mate with each other; otherwise they would impose a fitness cost.
However, if two subpopulations are not in contact, there is nothing enforcing compatibility between them. Therefore, as evolution does its work, these are free to wildly diverge from each other. Recall the example of the bird species in which males with blue crests enjoy reproductive success. The color itself is not particularly important, but it is important that the males all have the same color crest and the females prefer the same color. So as these birds evolve, the crest color can slowly drift in hue.
Now let's say you took these birds, and set a few of them free in one continent, and another group free on another continent. Again, over time, the crest color will shift. However, there is nothing stopping from the color in continent A from shifting to red while the color in continent B shifts to green. There is, after all, no advantage to being compatible with a population you are not in contact with.
The example above is largely behavioral, but non-behavioral examples are also possible. A very fundamental process is fertilization: Eggs have an ECM made up of proteins unique to that species, while sperm have enzymes to digest the coat of their own species. Because of this, cross-species fertilization is very difficult. Again, once you erect some kind of barrier between two populations, the systems of coat proteins and enzymes in the gametes of either population may evolve in divergent ways - they evolve in small steps, so that the interaction partner protein can always keep up, but compatibility with the isolated population is not selected for, and if the isolated groups are reunited after a very long time their gametes may end up becoming unable to fertilize each other.