Servlets are Java programs that handle requests from a web server, process the request, and return a response. They have advantages over CGI like being faster and platform independent. Applets are Java programs that run in web browsers on the client-side and are embedded in HTML pages using tags. When an applet starts, the init(), start(), and paint() methods are called in that order, and when it terminates the stop() and destroy() methods are called.