What you are talking about is a branch of computer science called computability. For a long time it was assumed that all problems were solvable. That is, although we may not KNOW the solution, one MUST exist. The cannonical example of why this is NOT true is called the Halting problem. Usually the proof involves using a Turing machine as a model of computation (but actually using a diagonalization proof, you can prove it for ANY model of computation).
Halting problem goes something like this: Can you construct a program HALT, which will read in another program P, and an input X and tell me whether or not that program P will ever stop when run with the input X?
The answer is no, you cannot, at least not something that works for ALL possible programs. Let us assume we have a Turing machine called HALT which can do what we say. This Turing machine takes in P and X, and returns True if P halts on X, and False otherwise. In this case, P is simply a natural number representation of the program. We can consider it an index.
Now, since we are assuming that HALT exists (although we are making no assumptions about how it works). We can then construct a different machine called DISAGREE which takes in just an input Y. DISAGREE(Y) will return True if HALT(Y,Y) is False, otherwise DISAGREE will never return and will loop forever.
As an input, let us use the index of DISAGREE (since it is a program, it must have an index) and called this index d. We then can call DISAGREE(d). DISAGREE(d) will return True if and only if HALT(d,d) returns False and HALT(d,d) returns False if and only if program d, when run on input d, never halts, but this implies that DISAGREE(d) never halts. This DISAGREE(d) halting implies that DISAGREE(d) does not halt. This is a logical contradiction, which means our original assumption that HALT can exist must be false. Therefore, no program can exist which solves the Halting problem.
----
Thats pretty much from memory, so please point out any minor mistakes. Its actually now possible, using HALT, to prove lots of other problems as unsolvable using reduction. HALT is a problem in the class RE = recursively enumerable, non-recursive. It is considered semi-decidable, since given any arbitrary program an input, if it DOES halt, we can tell you (since we can just run the program and tell you if it halts). If it does NOT halt though, we can never tell you since it will just run forever.
There are actually harder problems that are not even semi-decidable, they are in a class called non-recursively enumerable. The cannonical problem for this is called the Universal Halting problem, which asks, given a program P, does this program halt on all possible input? Which essentially asks the question, is program P an algorithm? (since all algorithms are programs, but not all programs are algorithms). Even if we DO give you an algorithm as your input, you cannot possibly test all input, and therefore you cannot even reply yes for a yes case. Thus it is not semi-decidable (this is a reasoning, not a proof).
-AntonK