Complex program is not so easy to define. A program can be complex because the solution for the problem is complex (good example: FFT, for one without the background knowledge one cannot grok what the algorithm does, despite the fact that you can pack it in a handful of lines of code). Another complexity is the sheer size. Take as an example some business application. The business logic behind is very very easy to get, but the uncountable numbers of gui layers, framework abstractions, thousans of cases,.... make it just BIG.
To deal with the first kind of complexity you can nothing do than learn math, and algorithms and data structures (there are many books, and you find on stackoverflow many good book recommendations, like e.g. Coreman, Sedgewick, or the Algorithm Design Manual). To practice them your mentioned project Euler, or some programming contest pages like topcoder or old ACM contests are a good start. Also the aforementioned books from me have task/assignments for every topic.
The second kind you can only learn by doing. Here I can just recommend take a small hobby project (e.g. a CD collection browser if you got many CDs, a little game, or whatever) and implement it. After you finished your first implementation you should have enough knowledge that you will say yourself "If I had in the beginning known, that..., I would have designed...". To call it by name, it is in opposite to the algorithm knowledge from the first, software engineering. Here are also good books available (you are going to find good recommenations here too, like e.g. Code Complete). But here I would suggest practice, practice, practice, and finally practice. After you implemented your small project a 2nd time you are more confident with your skills I would recommend to move some bigger project. As you will see the complexity lies in bigger projects not within the programming, but more with the interaction and coordination of a team. To do this implement some little task in some open source projects. They need any help they could get and you will get some practice. And the better you become the more complex your tasks will be...