This is a very interesting question. I also would like to know how other developers do this. Up until now I use these possibilities in no particular order:
- Read the source code, it has the advantage that it is always up to date. It is also the
most difficult task, but it is possible. - Read the unit tests if they are available, they often show the intended use for a class, library or framework.
- Refactor a part of the source code. While you are improving the quality of the source code you increase your understanding of the code, or should I say you can only improve the source code if you know exactly what it does.
- Debug the application, step through the program while using a debugger.
- Use a tool like NDepends, JDepends, Lattix, Visual Studio etc. to reverse engineer the architecture or design of the application and use that as a starting point.
- Read the documentation. Any documentation that enables you to understand the application will do (user documentation, design documentation or architecture documentation).
- Communication with the original developers as Bruno said would also be a good option.