You define the logic of the program in source code. This source code is then compiled. With languages like C, C++ or VB(.NET) etcetera, the compiler creates an executable program that is directly runnable from within the operating system. With Java compilation, byte code is generated which cannot be executed directly withing the OS. An intermediate layer is needed. This layer is the JVM. The JVM is executable within the OS and you tell the JVM which byte code needs to be executed for your program logic.
Advantage: for (as far as I know) every OS, a JVM is available. So when you program in Java, your program can be executed on every OS. Because the JVM is an intermediate which is specific for the OS, you don't have to worry too much about the OS your program is running. When programming in another language, these are things to worry about.
I am the luckiest man in the world