Explain the difference between the JDK, the JRE and the JVM, and which of the three a server running your application actually needs.
They are three nested things, not three competing products. The JVM is the virtual machine: the piece of native code that loads your compiled class files, manages memory, and translates bytecode into operating system calls. The JRE is the JVM plus the class libraries it needs to run a program — the java.base module, the collection classes, the networking stack. The JDK is the JRE plus the development tools: javac, javadoc, jar, jlink, jpackage, the debugger front-ends and the source-level tooling.
So the relationship is JDK contains JRE contains JVM. A server that only runs a pre-built artifact needs a runtime environment, which in modern Java means a JDK image with the compiler stripped, or a custom runtime image produced by jlink.
Which one does a server need?
Only the runtime part. Shipping javac onto a production host enlarges the image and increases attack surface for no benefit. Practically, that means either a jlink-produced runtime image containing just the modules you use, or a base image with the JDK from which you remove the compiler.
Two details worth stating in an interview. First, the JRE used to be a separate downloadable artifact; there is no longer a standalone JRE, because jlink lets you assemble exactly the runtime you need from modules. Second, the compiler is not needed at runtime, but the class libraries are — and the JVM version must be at least as new as the class-file version your compiler produced.