Often books will give an example at the end of a section that ties everything they've been talking about together into and example prog. I've found it useful to skip straight to that example, copy it into the language, compile it, and then go back through the sections learning what each part of the code does, with the constant reference of a working example. This way you can also tweak the code like they mention in the text and see the results.
The other thing is to fiddle with the examples once you've programmed them to work out how they really work, not just rush on to the next chapter. It takes longer this way, but I've found I understand a lot more if I do it.