Hume's most famous attack on miracles came in a chapter of An Enquiry Concerning Human Understanding entitled "Of Miracles." Overall, the Enquiry is a work of skepticism, with Hume even voicing skepticism about reason itself. His treatment of miracles, however, is his most iconoclastic and striden chapter in the book. Essentially, he argues that events have to be observed firsthand to be believeable. However, if one receives a report of an event, then that person must determine its plausibility by weighing it against their own experience and observable natural law, which is itself the product of experience. (The credibility of the person reporting the incident is obviously another factor, though not necessarily the decisive one.)
Because miracles, even when reported by honest people, are contrary to natural law, they cannot be confirmed by reason:
A miracle is a violation of the laws of nature; and as a firm and unalterable experience has established these laws, the proof against a miracle, from the very nature of the fact, is as entire as any argument from experience can possibly be imagined.
To cite an example, the fact that people die, and that they stay dead, is a constantly observable fact of life, in other words, a natural law. So if someone says that a person who was observed to be dead was brought back to life, then their statement is contradicting not only one's personal experience, but the collective experience of men in general, i.e. natural laws. Reason consists in asking oneself if it is more likely that the miraculous event occurred, or that the person reporting the event was deceived, mistaken, or lying:
When anyone tells me, that he saw a dead man restored to life, I immediately consider with myself, whether it be more probable, that this person should either deceive or be deceived, or that the fact, which he relates, should really have happened.
Since natural law dictates that people do not come back to life, Hume says, there is really only one conclusion to be reached. A miracle is a violation of natural law, which makes it, on its face, impossible.