The summary I give below is based on "Compilers, Principles, Techniques, & Tools", Aho, Lam, Sethi, Ullman, (Pearson International Edition, 2007), pages 1, 2, with the addition of some ideas of my own.
The two basic mechanisms for processing a program are compilation and interpretation.
Compilation takes as input a source program in a given language and outputs a target program in a target language.
source program --> | compiler | --> target program
If the target language is machine code, it can be executed directly on some processor:
input --> | target program | --> output
Compilation involves scanning and translating the entire input program (or module) and does not involve executing it.
Interpretation takes as input the source program and its input, and produces the source program's output
source program, input --> | interpreter | --> output
Interpretation usually involves processing (analyzing and executing) the program one statement at a time.
In practice, many language processors use a mix of the two approaches. E.g., Java programs are first translated (compiled) into an intermediate program (byte code):
source program --> | translator | --> intermediate program
the output of this step is then executed (interpreted) by a virtual machine:
intermediate program + input --> | virtual machine | --> output
To complicate things even further, the JVM can perform just-in-time compilation at runtime to convert byte code into another format, which is then executed.
Also, even when you compile to machine language, there is an interpreter running your binary file which is implemented by the underlying processor. Therefore, even in this case you are using a hybrid of compilation + interpretation.
So, real systems use a mix of the two so it is difficult to say whether a given language processor is a compiler or an interpreter, because it will probably use both mechanisms at different stages of its processing. In this case it would probably more appropriate to use another, more neutral term.
Nevertheless, compilation and interpretation are two distinct kinds of processing, as described in the diagrams above,
To answer the initial questions.
A compiler would create machine language which runs on the physical
Not necessarily, a compiler translates a program written for a machine M1 to an equivalent program written for a machine M2. The target machine can be implemented in hardware or be a virtual machine. Conceptually there is no difference. The important point is that a compiler looks at a piece of code and translates it to another language without executing it.
So an interpreter doesn't produce machine language but a compiler does
it for its input?
If by producing you are referring to the output, then a compiler produces a target program which may be in machine language, an interpreter does not.