Assuming you are just getting started with programming, the best thing for you do to would be to get a course or a book.
Trying to learn but picking it up as you go along is a poor idea - you will miss too much that would have made your life easier.
Find a box in your native language, that doesn't have multiple exclamation marks, "in xxx days" or "for dummies" in the title, and work through it doing all the exercises. Wrox do some good ones, as do Addison-Wesley.
A course may be a better idea if you can - you get a tutor, and like minded fellow learners!