I understand Clojure code is compiled into classes and executed by JVM. For a Java project, I'm able to see a Jar gets created with .class
files in it. But how exactly it works in case of a REPL?
Clojure code is compiled using the ASM library into class files. Those class files are loaded into a custom DynamicClassLoader.
Good talk on the compilation process: https://www.youtube.com/watch?v=-Qm09YiUHTs