When you compile Java source code using javac (the primary Java compiler included in the Java Development Kit), the .class files that are produced from the source code contain bytecodes1 that can run on the Java Virtual Machine (JVM), rather than machine code that is native to your processor.
So, to answer the question in the title, the JVM is essentially a program that can run your .class files by mapping Java bytecode (“the machine language of the Java Virtual Machine”) into platform specific instructions. Oracle’s docs on the subject can be found here. As noted in those docs, if you use the java launcher tool, the launcher tool will run your application with an instance of the Java Virtual Machine. See these docs for some more information about the java launcher tool.
Any operating system that wants to be able to run Java bytecode will need an implementation of the JVM that follows the specification defined by Oracle here: https://docs.oracle.com/javase/specs/index.html.
- From wikipedia: “Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (normally numeric addresses) that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.” ↩︎