David Hume's Big Idea in his Treatise on Human Nature is to convince us that our reliance on Cause and Effect is all in the mind. It's not a relation built on reason, but from the force or "vivacity" of an idea prompted by a succession of perceptions.
Before Hume, the "causal maxim" reads thus: Whatever exists must have a cause or ground for its existence.
In 220.127.116.11 Hume presents this maxim as follows. A cause is
an object precedent and contiguous to another, and where all the objects resembling the former are plac'd in a like relation of priority and contiguity to those objects, that resemble the latter[.]And so it goes backwards from cause to cause, turtles all the way down. That's no good, says Hume, because you can't prove it. There is no "metaphysical necessity" that causes go on forever. In fact, we might note, there's a creation problem in there somewhere. Is there a First Cause, or do causes go on forever?
All we can say, says Hume, is that the mind prompts us to believe in cause and effect. A cause is
An object precedent and contiguous to another, and so united with it in the imagination, that the idea of one determines the mind to form the idea of the other, and the impression of the one to form a more lively idea of the other[.]So it's the imagination and, following a lively idea, the mind that make the connection between cause and effect.
We can understand better what is going on if we think of the problems that Google's self-driving car must solve. Google Car is an entity programmed by humans to navigate without human intervention in the world. It uses cameras to provide it with a constant supply of images of the world "out there," and it must resolve the successive images into something useful. What is useful is to call patterns that seem to persist from frame to frame "objects" and keep track of them, assuming that these "objects" are entities out in the world that Google Car needs to understand and deal with. For instance, Google Car might interpret a certain seemingly persistent image as a "traffic cone" and another as a "flagman." It makes sense to classify these persistent images as objects. Google Car needs to respond in one way to a supposed "traffic cone" and in another way to a supposed "flagman."
All Hume is saying is that we must restate the causal maxim into something like this: "Whatever perception the imagination decides is an object the imagination also deems it to have a cause or ground for its existence."