JDK is the short form of (Java Development Kit). We use JDK to compile .java files. So, when you are writing .java files, JDK is mandatory to compile those files and generate .class files.
JRE is the short form of (Java Runtime Environment). It is used to execute compiled java files. So, when you have a .class file, you need JRE to execute those. It contains JVM.
JVM is the short form of (Java Virtual Machine). JVM is the core component of Java. It is the interface between your OS and your execution layer. Basically, it creates an environment for you to run your compiled Java files.