The theory of evolution proposes an explanation for how life in general and mankind in particular arose. It holds that that there was a long period in which natural processes gave rise to life and to the different life forms on earth.
This in no way conflicts with the idea of God. As the omnipotent Creator, he is free to create either quickly or slowly and either directly or through intermediate processes that he sets up.
He can even do a mixture of these things, such as creating the universe in an instant (as apparently happened at the Big Bang) and then having it experience a long, slow process of development giving rise to stars and planets and eventually life forms including human beings.
He can even intervene periodically in these processes going on in the universe, such as when he creates a soul for each human being or when he performs a miracle.
From its perspective, science can learn certain things about the laws governing the universe and the processes occurring in it. But that does nothing to eliminate the idea of God, for the question remains: Why is there a universe with these laws and these processes in the first place?
Consider an analogy: Suppose that after a thorough and lengthy scientific investigation of the Mona Lisa, I concluded that it was the result of innumerable collisions of paint and canvas which gradually went from indecipherable shapes and colors to a beautiful and intriguing picture of a woman.
My analysis of the painting may be correct. That is, in fact, what the Mona Lisa is and how it developed. But it by no means disproves nor makes unnecessary Leonardo Da Vinci as the painter behind the painting.
Furthermore, if we were the product of a purely random processes then we have good reason to doubt our mental faculties when it comes to knowing the truth. Why? Because our mental faculties would be the result of a random evolutionary process which is aimed, not at producing true beliefs, but at mere survival. But if that were the case then why should we trust the idea that we are the product of purely random factors? The mental processes leading to this conclusion would not be aimed at producing true beliefs.
Charles Darwin seems to have understood this when he wrote:
“With me the horrid doubt always arises whether the convictions of man’s mind, which has been developed from the mind of the lower animals, are of any value or at all trustworthy. Would anyone trust in the convictions of a monkey’s mind, if there are any convictions in such a mind?”
This worry disappears if God was guiding whatever process led to us and if he shaped the development of the human mind so that it was aimed at knowing him, and thus knowing the truth.