You've all heard it before: "Why should we trust science if it's constantly changing?" The implication, of course, is that scientific ideas—specifically, the scientific ideas that contradict religious beliefs— are not to be taken seriously or treated as facts, because the history of science demonstrates that previously accepted ideas can be overturned and no longer regarded as accurate. While there actually is some validity to this argument, religious people tend to take it much too far.
So, why should we trust science if it's constantly changing? First off, because it produces results. Science works. The computer that you're reading this on works, thanks to scientific advancements. Rocketships fly to the moon because of scientific ideas. You can't pray a rocketship to the moon. Try as you might, it's not going to work. What will work is having a group of engineers and astrophysicists and mathematicians come together and collaborate using scientific principles. Even if it's not guaranteed to work perfectly every time—if the occasional space shuttle unfortunately malfunctions and explodes in the air—science is the best method we have for a project like this.
I can assure you: if every priest, rabbi, and imam in the world scanned their holy books for relevant bits of scripture and said prayers, they would not produce the end result of a rocketship screaming through the atmosphere at 25,000 miles per hour. They would end up exactly where they started: holding an empty sack. Like it or not, if you want to see progress and actual results, you're going to have to turn to science.
This argument implies that change in science is a bad thing; but, as is typical, religious people have this completely backwards. The fact that science changes is a good thing! It's a sign of progress. Science changes in the light of new evidence. With every such change, we get that much closer to having a fully accurate set of explanations. Contrast this with religion: Religions are static; you can't change the holy books that people think are the perfect word of God. This is a recipe for the ultimate form of close-mindedness. So we can flip their question around and ask them: "Why trust the Bible if it's unchanging in the face of new evidence?"
Of course, while the holy books remain the same, people's interpretation of them does change. But ironically, it changes as a result of the very scientific process that they tell us we shouldn't trust! It's not like a group of archbishops and priests came together and discovered some previously overlooked Bible verses that said: "and the LORD said: the Earth is 4.5 billion years old." No, their views change because their original position becomes so untenable in the face of scientific evidence to the contrary. Only then do they look back to scripture and try to reinterpret Bible passages to match up with this new view, a process Christopher Hitchens called "retrospective evidentialism."
Another thing to point out is that not all scientific changes are wholesale falsifications of previous ideas; it's not like every change in science leads something we thought completely true to be thought of as completely false. For example, Newtonian physics has been superseded by Einsteinian physics, but only at the very edges, either at extremely high speeds, close to the speed of light, or at extremely small scales. Aside from these situations, Newtonian physics still works; you can still use its principles and equations to launch a satellite into orbit. We now know that it's not perfect, but it's not completely useless all of a sudden; it's just inaccurate under certain extreme circumstances.
Furthermore, the fact that certain scientific ideas in the past have been inaccurate doesn't mean that we can't be quite certain that other scientific ideas are well-supported. For example, the idea that DNA is the heritable material responsible for determining the characteristics of an organism is an extremely well-substantiated one. The idea that somebody is going to discover tomorrow that DNA has nothing to do with the phenotype of an organism is inconceivable; it's next to impossible, given the vast body of evidence and experimental findings that support our current understanding of DNA. Of course, it's quite possible that our understanding will be refined as we learn more; in fact, the environment and epigenetic inheritance are now also thought to play a role in shaping an organism's phenotype. But the idea that we might discover one day that DNA has absolutely nothing to do with the characteristics of an organism is inconceivable. There are just mountains of evidence that tell us otherwise.
This argument is far too simplistic, because it lumps all of science under one umbrella. The reality is that different scientific ideas have different amounts of supporting evidence and experimental data. For example, a new drug that was developed a month ago might only have one or two supporting experiments attesting to its efficacy. It's possible that maybe these few experiments were flawed in some way, so perhaps the drug actually doesn't have the alleged effects. Contrast this with a drug that's been around for decades, and which has been studied in the lab hundred of times in many different ways by many different groups of people. We can be much more confident that this drug works as promised. So the point is: there's a gradient of confidence that we have in scientific ideas based upon the amount of supporting evidence and experimental data, as well as the number of attempts made to falsify the idea.
Instead of taking this nuanced approach, religious people tend to point to one isolated scientific idea that has been either refined or outright scrapped altogether, and they try to use this as representative of all of science. This is not a reasonable approach. Of course, any scientist worth the name is willing to chance their position in the light of new evidence. But the thing to understand is that there's a spectrum of likelihood that a given scientific idea will be overturned, and certain ideas are so well-supported that we can tentatively treat them as established facts.
Finally, I'm going to close with an analogy. Let's imagine that somebody makes this argument not about science, but about the safety of cars. This isn't a perfect analogy, because thousands of people die each year in car accidents, but it's good enough to illustrate my point. Imagine that somebody says: Why should we trust cars to be safe if their safety features are constantly changing? How do we know that today's car is any safer than a car that was designed 70 years ago?
The answer is that cars have become progressively safer over the years as the designs have improved. New features have been installed that make them safer, including bumpers, seatbelts, airbags, side airbags, emergency brakes, and so on. If you crashed a car that was designed 70 years ago into a brick wall at 40 miles per hour, and crashed a car that was designed today into a brick wall at the same speed, you would be less likely to get killed or seriously injured in the modern vehicle. Just as there has been a steady progressive trend towards safety in cars, there has been a steady progression towards accuracy in science. So why should we trust science if it's constantly changing? Because it's changing in the right direction.