What is a Java Virtual Machine?

A Java Virtual Machine (JVM) is a program that translate Java programs in native machine code. Java programs are not compiled directly into machine code as for C++. Instead, they are compiled into a sort of intermediary machine code. This machine code will not run directly on any computer. It first must be translated into real machine code which is what the JVM does. So as long as a computer has a JVM to do the translation, it can run any Java program whatever its operating system is. It is the JVM that allows the same program to run on a Mac as well as on Windows or Linux. Of course, this flexibility comes at a price.

You can find a more information about Java technology on Java Developer website or by reading James Gosling's white paper: “The Java Language Environment”.