A computer doesn't understand English, and it doesn't understand code either, not directly. Code is just a very strict, very literal way of writing down instructions, one after another, that eventually get translated into the 1s and 0s the hardware actually runs. Your job as a programmer is basically to write instructions specific enough that there's no room for the computer to misunderstand you — because it will absolutely do exactly what you typed, not what you meant.
That's the single biggest mental shift when you're new. A person reading "make the list unique" will figure out you mean remove duplicates. A computer needs you to say precisely what "unique" means, precisely what a "list" is in this context, and precisely what to do with each item. This is why beginner code often breaks in ways that feel unfair — the computer isn't being difficult, it's just refusing to guess.
Unless you tell it otherwise, a program executes one line, then the next line, then the next, in order. That's it. There's no magic — a program is a to-do list, and the computer works through it in sequence.
This prints Step 1, then Step 2, then Step 3, in that order, every single time. Nothing runs "in the background" or "whenever" unless you specifically set that up. Once this clicks — that code is just a sequence of steps happening one at a time — a lot of confusing behavior starts making sense, because you can literally trace through a program line by line in your head and predict what it'll do.
Every language has its own syntax — the specific punctuation, spacing, and structure it expects. Miss a closing bracket, a colon, or a quote mark and the program usually won't run at all, rather than running with a small mistake in it. That's actually a good thing once you're used to it: the computer is telling you immediately that something's off, instead of silently doing the wrong thing.
Early on, most of your errors will be typos like this, not actual logic mistakes. That's normal. It's not a sign you're bad at this, it's just what learning a new, very picky language feels like at first.
When you write code, you're writing a text file. On its own that file does nothing — it's just words on a page. To actually make it do something, you run it through an interpreter or compiler, a separate program that reads your text file and either executes it directly or translates it into something the machine can execute.
Python, JavaScript, and similar beginner-friendly languages are interpreted, meaning there's a program (the interpreter) that reads your code and runs it line by line as it goes. That's part of why they're common first languages — you write a line, run it, and see what happens almost immediately, instead of waiting for a separate build step.