Here's a breakdown:
* Compiled languages: Code is translated into machine code (the language computers understand) before execution. This process is done by a compiler, and the resulting machine code is saved as an executable file. Examples include C, C++, and Go.
* Interpreted languages: Code is executed line by line, without being compiled beforehand. An interpreter reads and executes the code directly, without creating an executable file. Examples include Python, JavaScript, and Ruby.
Key differences:
* Execution speed: Compiled languages generally run faster because the machine code is ready to go. Interpreted languages can be slower because they need to be translated on the fly.
* Portability: Compiled languages may require recompilation for different platforms. Interpreted languages are usually more portable because the interpreter handles the platform-specific differences.
Note: Some languages can be both compiled and interpreted, depending on how they're used. For example, Java is compiled into bytecode, which is then interpreted by a virtual machine.