A language over a given alphabet is decidable if and only if there exists a Turing machine that reads strings over that alphabet and eventually delivers a yes/no answer. The answer must be "yes" for strings in the language and "no" otherwise. (That implies that eventually the TM halts.)
The most famous undecidable problem is whether a TM halts on a given input. That means that there is no TM that reads the description of a TM and its input, churns for a while, and inevitably halts with the correct verdict. For some TMs and inputs it's easy to say whether they halt, but the undecidability of the halting problem means that there is no TM that works in general.
Incidentally, if there is no TM that gets the job done, no program in any of the languages that you or I may know can do it either.
In computability and complexity, we often use reductions. The idea, in the case of decidability, takes this simple form: if I could find a TM that decides this language, then I could trick it into deciding this other language. Since a theorem assures me that the "other language" is undecidable, the TM I'm looking for does not exist.
In this specific case, as in many other cases, we investigate if the decidability of language $L$ implies the decidability of the halting problem. If it does, then $L$ must be undecidable.
The choice of the halting problem is a natural one, because in both cases, a Turing machine reads another machine and an input string. "Tricking" the TM for $L$ to solve the halting problem, however, means that to decide whether $M$ halts on input $w$ using the TM for $L$, we may need to construct another machine $M'$ from $M$, and possibly another input $w'$ from $w$, for which we test membership in $L$. How should we go about it?
If a TM does not halt it does not enter its accepting or rejecting states. So, clearly, if $M$ does not halt on input $w$, our hypothetical TM for $L$ will answer "no." However, if $M$ halts on input $w$, it may still not visit all states; in particular, it either does not visit the accepting state or does not visit the rejecting state. It may also not visit other states. This is what we need to fix in obtaining $M'$ from $M$.
I'm sure there's more than one way to do it, but here's one way. Modify $M$ so that, on entering either the accepting state or the rejecting state of $M$, it executes an "endgame" procedure, in which it replaces the input with a string of special symbols (symbols in the tape alphabet that are not in the input alphabet). It then visits all the states one by one and finally halts. The transition relation of $M$ is extended in such a way that, from every state, on reading the special "endgame" symbol, $M'$ moves to the next state in a pre-determined enumeration of the states.
While the above may seem a little messy, a programmer will immediately recognize that it's doable with a little patience. (Programming TMs takes a lot of patience.) The upshot is that if we could tell whether $M'$ visits all its states on input $w$, we could tell whether $M$ halts on input $w$. Since we cannot do the latter...