When Charles Darwin proposed that the mechanism underlying biological evolution was natural selection the seeds were sown for the removal of teleology from biological causal explanations. As a result animate functions were no longer considered, by scientists, to be due to the design of a Creator.
Instead they began to consider those functions to be naturally selected according to efficient causal influences, i.e. the physical events in the past that come together to bring about change in the present.
The central point of this view is that in a particular environment some organisms are better adapted for survival than others. These organisms produce a higher proportion of viable young than their counterparts. This means that their kind tend to increase in proportion in the population over the generations.
The mechanism of natural selection for producing functional change in organisms relies on there being variability in the population for some function or trait. This variability occurs as a result of variation appearing in the genes of the organism. Any given gene can exist in multiple forms called alleles and these can give rise to different functional expressions of the genes, i.e. the phenotypes of those genes.
Importantly these differences in particular genes can result from genetic events such as mutations and so is an ongoing process. These mutations can come about through copying errors or from physical damage such as radiation. Whatever the source, there is always new variation appearing for evolution to work upon, although most mutations are deleterious and are therefore selected out of the population.
Biological theorists do still use teleological language to some extent though, just as a way of thinking about problems in the subject. Richard Dawkins' idea of so-called selfish genes using bodies as vehicles in order to further their own chances of replication is a prime example. It can be advantageous to think from the gene's eye view, so to speak. But such language always comes with the warning that this is just a way of talking about the phenomena and that the real causes of the phenomena are efficient causes, i.e. events that occurred to a creature's ancestors in the past.