First, it is important to note the difference between the instruction codes stored inside a computer’s memory and any representation of the algorithm written in a human-readable form.
Most computer memories store both data and instructions in the same way in memory (Von Neumann’s wonderful design idea), thus allowing programs to be created and modified by the computer before they are executed by the computer. The programs that work on programs as their data are called translators (includes compilers and interpreters).
In the Intel 8080, the instruction:
10000110 ADD M (this is binary and the mnemonic representation)
causes the contents of memory location M to be added to the contents of the accumulator.
Engineers developed a binary ADD operation for strings of binary digits using logical OR, AND, and XOR logic gates (note: check logic operation results to see how). If a machine can ADD, it can SUB. If it can ADD, it can MUL. If it can SUB, it can DIV – all by using multiple operations. If the address of the next instruction can be modified, the computer can branch. So, SUB and conditional branch produces a nice compare operation.
Since nobody wanted to remember 10000110 and all of the other operation codes, they quickly developed a Translator called an Assembler that changed “ADD M” into “10000110” and kept a symbol table of addresses so that M could be relocated in memory.
High-level languages were soon developed. This allowed human-readable, math-like statements like “A=A+M” which added the contents of memory location M to the contents of memory location A and stored the result back into memory location A. The syntax was limited by the available characters on keyboards of the time (keypunch machines).
It was soon realized that high-level, human-readable statements were valuable and should create programs that would execute on different physical machines. Thus, Compilers (that read the human-readable language) and produce intermediate, non-executable computer-type code were developed. There had to be a second program, a Loader or an Interpreter, to act as the Translator from this intermediate code into the actual machine-executable code. In the modern era, Java is the same on every machine because the Java Compiler generated the same Bytecode for a program, but the Java Virtual Machine that is unique to each physical machine executes this Bytecode as an Interpreter (it is never actually translated into physical machine code).
So, Translators include Compilers and Interpreters (and other types). Compilers translate from human-readable representation into an intermediate representation, then a Loader or Interpreter processes that on the specific computer. An Interpreter may take either the original human-readable representation or an intermediate representation (like Java Bytecode) and perform each statement/operation rather than translating each statement/operation. Thus, Interpreters are slower, but far more portable, than Compilers (but with inexpensive, extremely fast computers now, human time is far more important).