JDK (Java Development Kit) is a software development kit used to write applets and applications using the Java programming language. It is set tools and libraries. It has tools that convert source code into java byte code. The tools include compiler (javac.exe), Java application launcher (java.exe), Appletviewer, etc
Where as JRE (Java Runtime Environment) is an environment required to run applets and applications written using the Java programming language. JRE includes Java interpreter, Java API libraries, Java browser plug-in, which make up the minimum environment to execute Java-based applications
The JVM (Java Virtual Machine) is the core of the Java platform and is a part of both the JDK and JRE that translates Java bytecodes and executes them as native code
on the client machine.
JDK includes a JRE as subset.
In simple you need JDK if you want to write, compile and run the code. You just need JRE if you want to run the java based applications.