The execution of a program depends on the programming language. For example, a program written in a high-level language cannot be executed right away, because it is written in source code, and the source code is only human-readable and therefore cannot be understood by computers. The source code must therefore be translated into machine code with the help of a translator.
There are different types of translators. High-level languages can be translated into machine code in two different ways, either by using an interpreter, which allows to translate instructions line by line.
Or by using a compiler, which allows to translate all the instructions at once.
Any low-level language written in assembly code can also not be understood by computers. Assembly code is translated into machine code using an assembler.