Science works by testing theories. But I (and philosophy of science as written by scientists generally) have been tight lipped on the subject of where these theories come from. Some say that theories are essentially random, some that they are artistic and require genius to understand. All say that it doesn't matter where they come from. The problem with this kind of philosophy of science is that it's totally false. Scientific theories are not random, they dont require genius, and it does matter where they come from. For easy example I'll take Newtonian gravity.
The distinction between scientific theories and metaphysics is important here. If you generated theories at random (whatever that would mean) you would almost defiantly never generate even a simple understanding of the world. Perceptions are just too complex, you cant hope to get a good approximation of them randomly, there's just too much going on. So we need a way of testing theories that are likely to work better than by chance. The way you do this is to imagine an “ultimate reality”, some version of the world that is metaphysical, but tied to perceptions.
So, Newton is sat at his desk working out the force of attraction between two point masses. He is now 90% of the way to solving the problem. Because asking that question needs a conceptual framework, you need to imagine that there are such things as point masses, you need to imagine that these accelerate due to force, you need to imagine that forces can happen in the gaps between them. This framework cannot be directly tested, because there's nothing in it that makes predictions. You cannot deduce from this how large objects act, what the relationship between acceleration and force is, and what forces act in the gap. But just because it cannot be tested itself doesn't mean it's as good as any other metaphysic.
Because the possible answers to these questions are quantitatively very few, and are suggested by the metaphysic. Once you have this conceptual framework to act as a heuristic the answers (like a point mass at their centre of mass, Newton's Second, and Newtonian Gravity respectively) are reasonably obvious, (that is, if you're the greatest mind to have existed). Without this kind of a framework minds as as good as Newton in the Classical age would never have thought of Newtonian gravity, because guessing it randomly is next to impossible.
So, given that it is possible for a heuristic to exist that will give you very good theories far better than chance. (Why this is so is a metaphysical question, “because that's what the universe is really like” is one answer, “because such conceptions tap into a subconscious understanding of our perceptions we already have” is another). The question is which do we go for. Do we keep dogmatically with a static eternal idea of the universe and expand and refine Newtonian Mechanics. Or do we shift to a new paradigm, an Einsteinian paradigm. Now this is not a question of one theory verses another. You can formulate General Relativity in Newtonian terms, (you just say that point forces exert a force on each other given by a hideous formula that looks very similar to one you use for dealing with curved space). The reason nobody does this is that it makes no sense. The theory does not follow from the paradigm.
The real question is not which theory is right, the question is which paradigm generates it. Newton's Law follows from his paradigm just as obviously (if you're a genius) as Einstein's does from his. The way you test what paradigm you use is to see which generates the best theories. We can even refine this idea. Sometimes theories are very general and take a lot of work to particularise. Consider the moon landings. At the time computing power was a scarce resource. So when the question arose, do we calculate using Newton or Einstein Newton won. Now General Relativity is the better theory, is makes predictions that are closer to reality. The problem is that these predictions are hard to compute, Newton is easy to compute with and well understood. Because of resources Newton's calculations could be done to far more decimal places, so whilst Einstein would have eventually beaten him, Newton won the race to the moon.
So I'd like to suggest that we think about predictions a different way. I'd like to suggest that it isn't the case that if one theory beats another it does so everywhere. If one theory makes one kind of prediction well (eg prediction the bending of light by gravity) that doesn't mean it will make another sort (eg low resolution predictions) just as well. So, we must always pick the right theory for the job, bearing in mind the situation. And we must always keep the right paradigm in mind, considering its results.