I have a M.Sc. in physics We had some programming classes, but definitely not enough to become an actual developer - which brings us to the second question…
Programming in my free time, a lot of it. I became interested in programming when I was ~13 years old, started with some simple DOS programs in Pascal, moved to C/C++ and learned x86 assembly along the way.
Note: this might not be as relevant today, as most of software development has been taken over by high-level languages with managed memory, but I feel like learning C/C++ and assembly really helped me understand how computers work and actually become a better programmer.
This was enough to get my first job after the university, which was actually in Python, and I learned it on the job. Before that, I had some kind of internal resistance against “modern” (which mostly meant: managed) language, I felt like I don’t have enough control if I didn’t allocate/free memory manually - this job changed that, I fell in love with Python and started appreciating the productivity it brought. It also made me interested in what other languages had to offer, and I started picking up bits of this and that (Java, C#, Haskell…).
Then Rust reached 1.0, I started reading about it and became fascinated by it, learned enough of it to be comfortable putting it on my CV, a recruiter working for MaidSafe found it, and here I am
The Internet! Choose a language, google tutorials about it, and start writing simple programs!
Start with something really simple, then think of features you would like to add and research how it can be done. For example, one of my first bigger projects was a DOS program implementing a Vigenere cipher (look it up, it’s really simple). I started with something that just asked for text and a key, then added a menu, an option to save and load data from files, things like that. Gradually learn more advanced things (for example GUI: creating a window, controls, handling events…), and after some time you will be amazed how much you learned
I can’t really recommend a single website that would help - my self-education started with reading books I stumbled upon, and afterwards I was just googling things I wanted to learn (eg. “how to send data over the network in c++”). It doesn’t really matter which exact resource you use - most of them provide enough to get the basics, and after that it’s just picking up specific topics one after another.
Sorry for such a long text Hope that helps, at least!