A computer has one job. Wait for an input, do something (what we tell them, hopefully!) and return an output.
Yes, looks like they do a lot more. But if you bring things to simple terms, it’s all input and output. You open a program - you gave the input with a mouse click, or the command line. You click a button. You press a key. You .. do things. The computer runs a program that is built to handle that input.
And the computer returns a result. Something moves on the screen. Words. Pictures. Things happen.
Internally, a lot happens between the time you give the input, and the time you receive the output. Which might be just a few milliseconds, but code (as we know) is executed really, really fast.