Programming is deciding now what you want to happen later.
It’s what you do now so that what you want to happen later will happen later.
It’s a manifestation of your will. What you want to happen will happen.
You reduce your will to language. You use your words to describe what you want.
Your words describe what you want to happen later. You write them while you are programming.
The words you wrote are called a program.
The language you use to write the words is a programming language.
Your program will become the will of something later. You will see to that.
When what you want to happen will happen it will happen because your program is running.
It will start to happen when some event occurs.
That event will cause your program to start running. It will run until your will is accomplished.
That is a good question.
That is called “the halting problem“.
It depends on how you wrote the program. It depends on what you wanted to happen.