I’m not traditionally a Java developer, so take my explaination with a grain of salt. But I do believe this is how things generally work from my time toying around with Ktor and understanding the Java ecosystem:
Most Java “application servers” use the Servlet protocol to enable one to run HTTP servers. Basically, this means that you start a process with the Java application server (Netty, Jetty, etc) and then your server artifact gets loaded dynamically by the classloader of that application server. You typically bundle a “fat jar” (a single JAR or WAR file) with all your own server’s dependencies, but not depending on any particular server implementation. So the application server loads up your fat jar and starts communicating with it in-process via the Servlet protocol (or something similar to that) to forward HTTP requests to your application, where they are actually handled.
So the process of an application server actually serving your own site’s content does not requlre an external network connection, so it’s all very quick, but it does potentially open up issues with classloaders (though you probably don’t need to worry about this)