If you really want to understand something, the best way is to try and explain it to someone else.
That forces you to sort it out in your mind. And the more slow and dim-witted your pupil, the more you have to break things down into more and more simple ideas. And that's really the essence of programming.
By the time you've sorted out a complicated idea into little steps that even a stupid machine can deal with, you've learned something about it yourself.