Hume regards causality as an inference, or conclusion, drawn by the human mind when it observes two things happening one after the other—repeatedly. He uses the basic example of one billiard ball striking another, saying that the first time anyone saw this occur (or any similar object striking another), they would have no way of knowing that the one object's movement would be followed by the other's. It's only after we have seen this and similar events occur over and over again in sequence that we decide (as civilization as a whole has done) that the one event "causes" the other.
The second example Hume uses, in the "Of the Idea of Necessary Connection" chapter of the Inquiry Concerning Human Understanding, is that of a violin string causing a sound when it is vibrated:
We say, for instance, that the vibration of this string is the cause of this particular sound. But what do we mean by that affirmation? We either mean that this vibration is followed by this sound, and that all similar vibrations have been followed by similar sounds; or, that this vibration is followed by this sound, and that, upon the appearance of one, the mind anticipates and forms immediately an idea of the other. We may consider the relation of cause and effect in either of these two lights, but beyond these we have no idea of it. [Italics in the original.]
Many readers would probably conclude that this is simply a matter of "semantics." What difference, some people might ask, does it make if we label the conjunction of two events as "cause" and "effect" even if they are just things that always happen one after the other without the first "causing" the second?
The answer is that Hume's point, if oversimplified, is that reality consists only of what we directly experience. Yes, it is "matter of fact" reasoning to say that one event "causes" another, but Hume's assertion is that the "cause" is not something that is perceptible by us, in the way the events themselves are. Multiple instances of one billiard ball moving after being struck by the other are no different from a single instance of this happening, and when it happens multiple times, we feel that there is a causal connection between the two simply as an inference, a conclusion that our imagination supplies to the event.
The larger, all-encompassing example Hume supplies of this fictitious (in his view) principle of causation is the universe itself. In the chapters of the Inquiry "Of Miracles" and "Of a Particular Providence and of a Future State," he basically attempts to refute any rational basis for organized religion or belief in the "supernatural." Philosophers, for the most part, regardless of their religious background or specific religious beliefs (if any), had believed in the "argument from design"—that there must be a Deity because the world, the universe as a whole, had to have a Creator, a "first cause."
Though he does not state it so openly, the ultimate conclusion of Hume's philosophy is that there is no evidence to support any particular religion or even the existence of God, since the rationale that there must be a cause for everything is simply a creation of human imagination. The publication of the Inquiry in 1748 was a seminal event in the European Enlightenment and in the history of philosophy.