What do you mean by compilation and execution ?

Compiling the program:  Once coding is completed and the program is feed into the computer, then by using appropriate compiler the program is transformed into machine readable form. The compiler will display the errors, if any and then you should correct the errors and recompile the program until it becomes error free.

There are two steps in executing a program, compilation phase and then execution phase. Compilation is required to detect syntax and semantic errors in a program. Compiler is a translator that converts high level language into machine language so that it can be run on machine, because machine can’t understand human readable language.

Basically program languages use two types of translator: compiler and interpreter. Compiler before executing a program generate executable machine code and then executes it.