I believe that practice is the most important aspect. Books give you "a map", and it's difficult to start without a map, but until you explore the territory on your own, you can't really understand it. So, pick any project that interests you, and just go ahead and implement it.
Regarding how many years does it take - see Teach Yourself Programming in Ten Years by Peter Norvig.