Here's a method that works for me. And I have been "learning" to program
for 20 years.
Figure out what you want to program first. If you're just learning, pick
something simple...say, an entry field, and a button that when clicked,
puts the text from the entry field to a label.
Don't worry about the language or anything, just draw it on a piece of
paper.
Ok. Then, start digging around to figure out how to accomplish it. That
means, lots of Google research, asking people on the Internet and so on.
Make it your project. Then you can ask specific questions about how to do
this or that.
Alternatively, go to a site like Code Project and find a project that
interests you. Download the code and look at it. Figure out how to
compile it ( that's 90 percent of the effort ). Then try changing it
around and see if you can change or break it in some interesting way.