Servlets are Java programmes that extend the capabilities of servers.
Depending on context, the term can be used to refer to an API that provides different interfaces and classes, an interface implemented when creating servlets, or a class.
Servlets can be used by servers to respond to particular types of network request.
They are commonly used to respond to HTTP requests, although they could be used to communicate over any client-server protocol.