When reading a programming book, professionals tell you to "type out and play with each example." This helps you grok it. A lesser talked about side-effect is how it builds an index of that book in your brain. Years later, you know what page to turn to given a specific problem.
Oh yea, that's almost always the best way to learn a new language though. (It's especially useful when you pick a language well-suite for a problem you want to solve, generally.)