When a URL is hit, the servlet container first reads the deployment descriptor (web.xml) to determine which servlet or filter should handle the request. The deployment descriptor maps URL patterns to servlet classes before any application code executes.