Compiler does not mean it will produce machine code, it just means the entire program is analyzed in its full and converted to something else (usually machine code, but it could be from JavaScript into TypeScript in example).
Interpreter on the other hand takes source code and compiles one line after another in realtime. In terms of programming languages, depending on the environment it can produce machine code or call a function from another program. It can but does not have to produce machine code.
There is also Bytecode and Just in Time compilation, which makes it even more confusing to explain.