You learn to solve hard problems just like you learn to do anything else: by working on them. The problem is that there isn't a "List of Hard Problems" posted anywhere. Aside from a few well-publicized ones (e.g. cure for cancer), being able to recognize a Hard Problem requires years if not decades of domain expertise, which most programmers don't have (since software engineering is a relatively young profession).