The Java compiler typically compiles source code into an intermediate language, expressed generically as "byte code". That itself is not machine code for your native hardware, but in a sense it is "machine" code for the Java virtual machine.
The benefit of this separation is that (in theory) you can implement a VM on many different platforms, but all of them will be able to run the same compiled Java byte code.
A just-in-time compiler is part of a hypothetical VM, and actually translates bits of byte code dynamically into real, native machine code, as and when needed. This grew out of the observation that running a Java program purely in a VM was a lot slower than equivalent native code. JIT compilation has made the Java VM competitive in terms of performance when compared to natively compiled code.