Servlets are Java platform-independent server-side components that extend the functionality of web servers. Servlets receive HTTP requests and return HTTP responses. The servlet container manages the lifecycle of servlets by calling init(), service(), and destroy() methods. The servlet API includes GenericServlet, HttpServlet, ServletConfig, and ServletContext classes that provide functionality for handling HTTP requests and responses and accessing configuration and context information.