Stepping through the code with a debugger, if it's too complected to be understood by just reading it. Also, nowadays, copying snippets (or whole files depending on the size) into ChatGPT and asking it to explain it you is pretty powerful.