These are in no particular order. I found them by researching what methods other developers use to understand codebases that they have not seen before.
- If the codebase has tests, read the tests
- Try to write tests for the part of codebase you are trying to understand. This helps in understanding the behavior and serve as documentation
- Get overview of project. See the overall picture. How many modules it has? What are the name of the modules? Pick one module and do deep dive into it.
- Writing documentation for source code. This is a good practice to understand the codebase. I tend to prefer writing tests over documentation since the source code and tests are truth, documentation decays over time, generally.