At an earlier stage, building my own sizable project helped me the most. I still remember writing bunch of Java code in the middle of Iowa when I was an exchange student, which ended up helping a lot of my friends course registration in my university and got great feedback about the UI of the program. I learned a lot, especially about all the basic system building, and the best thing was that it gave me the confidence that I am capable of building something useful.
Since then, one of my weekend hobbies was doing some fun project that does not need a whole lot of effort -- like making a simple dashboard for the family in Ruby, building a home automation bot in Go, writing some my own investment tool in Python, etc.
It's just the same as picking up another language or any other skill: there is no one path people learn it. The way I learned English was mostly by reading many books, and many other people learn a second language mostly by watching TV shows or talking to people. There is no set path -- although there may be necessary things people would need to do regardless to achieve high-level of mastery, like talking and reading in a language -- but one thing necessary is an incentive, especially a positive one, and building confidence over time.