Hume's attack on miracles comes again from approaching the subject from a naturalist, and not a metaphysical, viewpoint. Rather than inquire into the nature of miracles themselves, Hume asks how our belief in miracles might have arisen. He maintains that the only evidence we have of their existence comes from the testimony of others and that the testimony of others is just a kind of experience. Thus, our belief in miracles is grounded in experience just as much as our belief in the laws of nature or whatever else. Hume is not interested in questioning the possibility of miracles actually arising so much as he is interested in questioning the grounds according to which we justify them.
Miracles are a direct contradiction of the laws of nature, which we also infer from experience. Thus, experience provides us both with evidence for and evidence against miracles, and there is nothing beyond experience that can inform our judgment. We must then determine which judgment experience renders more likely. Hume suggests that experience has taught us to hold the laws of nature as most certain and indubitable. On the other hand, we often find human testimony to be mistaken, especially when dealing with supernatural matters. Since the laws of nature are far more probable than the testimony of witnesses, Hume suggests that we are never rationally justified in believing in miracles.
From these arguments, it is not hard to see why Hume was accused of atheism. We should note, however, that he by no means denies the validity of a great deal of religion. His attitude toward religion might properly be understood as consistent with his attitude toward metaphysics in general. Rather than deny its truth, Hume simply asserts that it deals with matters that are beyond the capacity of human reason. Miracles may exist, but we are rationally unjustified in believing in them. Based simply on reason and experience, we would have to judge that miracles do not exist. Hume accepts faith as an acceptable ground for religious belief, but insists that religion should confine itself to matters of faith and not pervert reason by trying to prove the unprovable.