A servlet is a Java object that interacts directly with a servlet container. When the container receives an HTTP request, it calls a servlet method with the request; the servlet uses a response parameter to build the reply. The container translates between HTTP messages and Java objects and methods. section 7.1.3
Figure 7.7 The servlet container (Tomcat) registers multiple servlet instances. Each servlet is associated with a path. When the client sends a request, Tomcat calls a method of the servlet associated with the path the client requested. The servlet gets the values on the request and builds the response that Tomcat sends back to the client.

See how a container associates servlets with paths, calls the matching servlet for a request, and sends its response back to the client. section 7.1.3

