A servlet is a Java class that extends the capabilities of web servers by supporting requests and responses. Servlets have a lifecycle that includes loading, instantiation, initialization, request handling, and removal. The GenericServlet class is an abstract class that implements the Servlet interface and provides lifecycle methods, while the HttpServlet subclass adds support for HTTP and HTTPS protocols by overriding methods like doGet() and doPost() to handle different request types. Servlets are loaded by the web server when first requested or during server startup to allow concurrent handling of requests using a single instance.