If there are syntax errors in the code, the compiler will tell you about them and will not run the program.
For example, try to run the following program:
print Hello, world!\n";
in which one quotation mark is omitted, and check what happens.
There is no need to manually compile the program before execution (i.e. to save a compiled version), although it is possible.