I'm a decent solo programmer and freelance web developer and I've created some simple back end programs together with a friend.
But when it comes to understanding even the most simple open source projects I can't for the life of me understand what's going on. There are so many functions relating to each other, so many classes that I just get lost. I'd probably get lost in everything my friends have written as well if they weren't there to in detail explain their architecture for me.
So how do you do you learn this? There are plenty of books and resources on how to program but I've yet to find any on how to read source code.
* Use a debugger and breakpoints for stack traces to understand program flow (if not available, throw an exception in a function of interest or insert print statements for the same effect).
* Either use an IDE that allows you to jump to definitions or map the project with grep (e.g.: grep -H 'class ' * > classes.txt) to save time when manually going to the definition (or anything in between, but what's available depends on the language).
* Focus: Especially when not used to code reading one can easily get lost trying to understand every single statement at once. Focus on what you want to understand in this reading session and develop a habit of doing the next step towards that goal once you got a good idea of what you are looking at. Perfect understanding is not necessary - if it turns out you missed a crucial part, you can still go back and re-read.
* Practice: The more you read and write code, the more proficient you'll become, the more intuition you will develop and thus the faster you'll be when skimming over unknown code.