To that end when I was teaching students I would print out snippets of code and have them evaluate the code in their head/on paper and then have them run the code to see if there was anything wrong. Repeat this process until your mental model matches what the computer does.
Now start writing that program and pick up the skills to solve little pieces of the big problem you want to solve.
Does your program need to fetch something from the Internet? Learn to do that. Does it need to read a file? Learn to do that.
Break up the problem into small manageable pieces.
Learn git to version your code. Invest one day to learn how to commit and push your changes into GitHub or GitLab. It will save you a lot of time and will avoid breaking your heart by not losing your code.
If you have a language in mind, learn the syntax quickly and to do the most basic stuff, then get a cookbook that shows you how to do useful things, like reading or writing to a file, or sending something to a server. These will help you solve the little pieces of your problem.
Software can be useful to people. What do you want your program to help you with? Imagine you can do anything in a computer, find a problem you're passionate about, and set out to solve it. You'll be way ahead.
You can also do that when you pick an nth language. When I wanted to learn Python, I started to write a program that would allow you to send airtime (mobile money) from one SIM card to other SIM cards of different operators. You can't do that, but I essentially did impedance matching.
The service would expose n mobile numbers corresponding to n operators. You send money to the number from your same operator, and then send an SMS specifying the amounts and the recipients. The service then would use its own SIM cards for the target networks and send money.
Learning can be accelerated doing a real project.
Then you can refine your programming.
Once you've got that rule down, pick a popular language (Python's good because you can ask questions and get answers), pick a simple program that'd be useful to you, and then figure out what you need to make it work. Then make it work, applying rule #1. Rinse and repeat.
You will sure have noticed that there are tons of free tutorials on the internet for all kinds of programming languages. If you're just curious about coding, pick one and go with it. If it doesn't suit your style of learning, pick another one.
This is the one that got me started: http://aelinik.free.fr/c/
The setup part is a bit dated. For programming basic little C programs just visit: https://www.tutorialspoint.com/compile_c99_online.php
If you take a look I'd be very interested to hear feedback.
https://codewithrepl.it/python-projects-for-beginners.html (still WIP website and not mobile resposive yet)
It covers super practical stuff step-by-step, and links to the resources you need.
Making Coding Skills Useful as a Non-Developer: https://code.likeagirl.io/making-coding-skills-useful-as-a-n...