Mostly by reading a good book to get the fundamentals down, then taking on a project to apply the knowledge and supplement the gap with online ressource. There are good books and nice open source projects out there. You can get far with these by just studying them with determination. Later you can go on the theoretical and philosophical part of the field.
How do you know what a good book is? I've seen recommendations in fields I'm knowledgeable about that were hot garbage. Those were recommendations by reputed people for reputed authors. I don't know how a beginner is supposed to start without trying a few and learning some bad habits.
If you're a beginner, almost any book by a reputable publisher is good. The controversial ideas start at the upper intermediary or advanced level. No beginner knows enough to argue about clean code or the gang of four book.