Evolution began the moment some randomly created molecule had the ability to replicate itself. Evolution progressed whenever a mistake (a mutation) during replication created a new entity that was more successful.
Eventually, the replicating molecules evolved into DNA, and later evolved into cells, and later into flatworms before evolving into species that specialized into male and female roles.
Most mutations died out quickly because mutations are both common and random and thus unlikely to be beneficial. It only seems like mutations occurred when they were needed because when a need arose, sometimes one of the many random mutations that were already occurring was useful.
When trying to understand evolution after DNA, it is often helpful to think of genes (snippets of DNA) as the replicating organisms, and to think of ourselves as their outer layer of mobile thinking armor, which they evolved in order to get as many copies of themselves into future generations as possible.
For example, if a gene mutated and made its carrier more likely to create children (e.g. better looking), then each generation would have more copies of that version of the gene than the previous generation until it was the only version in existence. Likewise, if a gene mutated and made its carrier less likely to create children, then that mutation would die out quickly.
Therefore, human behavior is the product of those genes that have caused our ancestors to get them into every generation, and most of those genes existed before we were human.
We may be the product of more than one billion years of evolution, but we are also the product of more than one hundred thousand years of human evolution, and we instinctively know that in the last few thousand years, we have evolved – a soul.