Either way the code needs to be changed to machine code to be read by the CPU. This is called translation. Compiled languages and interpreted languages gets translated differently.
Another thing to understand is run-time. Run-time is the period when the code is being executed. Compiled languages gets translated before execution, whereas interpreted languages gets translated line by line at run-time.
Note: from my understanding some compiled languages get compiled to assembly before machine code. I will admit that I do not know if that is true as well with interpreted languages.
Statically typed is when the data type for constructs are checked before run type. Dynamically typed is when it is done during execution. Sometimes there is confusion with this and the meanings of weakly and strongly typed. Weakly typed in general are languages that don’t require you to set a data type when you initialize a variable. They generally are more flexible with changing that variable’s type later on in the code. Strongly type requires you to define the data type for the variable.
Typically languages that are compiled, statically typed, and strongly typed are faster at execution. Interpreted, dynamically, weakly typed languages allows for more flexibility.
A language can have any combination or characteristics of those combinations that I have explained. With today’s languages and technologies there is a lot more grey areas in these definitions, but understanding these characteristics of the programming language that you write in, will help you write better code.