What is the best way to learn without thinking ahead?
A good way to force yourself to focus is to try to actually do something with the knowledge that you are trying to acquire.  To paraphrase one of my former advisors who I much admire as a teacher, there are three levels at which you can understand a subject:


Familiarity with the concepts: able to recognize and talk meaningfully about them.
Ability to employ the concepts effectively in solving problems
Ability to teach the concepts to another person well enough to get them to level 2.


It's easy to get stuck at mere familiarity if you aren't attempting to actually use the things you're learning in order to do things.  From a pedagogical standpoint, this is actually the main value of homework exercises.  

Now, what about doing it in the absence of an external forcing function (i.e., grades)?  If you can't motivate yourself to do homework-style exercises, why not pick a project that you actually think would be cool and fun, and let that be what forces you to put the learning to work.  For example, taking the electricity/circuits example, a nice classic example is to try to build your own FM or AM radio receiver from basic components (transistors, resistors, etc.).  It's low enough power to be physically safe and complex enough that you'll probably have to deal with a lot of interesting problems even if you start from schematics found online.  Then try to make it better... before long, you'll understand not just the basic concepts but why you need to know them and how they fit together.