A source to start with is Shabbos 67a-b, where R. Meir allows certain practices that have no natural basis, while the Chachamim forbid them as darkei ha-Emori, the ways of the pagan Amorites. The Gemara there lays down a basic rule, which is accepted as halachah (Shulchan Aruch, Orach Chaim 301:27):
כל דבר שהוא משום רפואה אין בו משום דרכי האמורי
Any practice which is done for healing purposes is not prohibited on the grounds of darkei ha-Emori.
(Shulchan Aruch there adds that any kind of spell (לחש) is also permissible, whether for healing purposes or not, unless it's been tested and found not to work.)
I haven't found any of the commentaries offering a rationale why all healing practices should be permissible. But it may be simply that, after all, the mechanism of action of "naturalistic" cures isn't always known either (more so back then, but there are still some cures today of which this is true), so that there's not such a sharp distinction between "naturalistic" and "non-naturalistic" ones.
(Another angle on that last point, actually: even when the mechanism of action of a given cure is known, we still know that it is Hashem Who makes it effective. To just trust in the doctor and his medicine would in fact be a form of idolatry. The same, then, must be the case when using an amulet or whatnot - it's not the amulet itself that heals, it's that the user trusts that Hashem will make it do so.)