The difference between compiled and interpreted languages is to do with how it is executed by the computer. Compiled languages are translated into a computer-readable language, and interpreted languages are not translated but are read and executed by an interpreter line by line.
The choice of using a compiled or interpreted language comes down to the execution time or the development time. The execution time of a compiled language is usually faster, as it doesn’t need to be read and understood by the computer first. However, the development of the code usually takes longer, as you have to wait for compilation before testing the code. The reverse is also true, interpreted languages are usually faster to develop but slower to execute.