An applet is a small program that runs in the context of a larger program on a client computer. Nowadays this usually refers to Java applets, which run in a browser, though it is possible the introduction of the term in AppleScript in 1993 slightly predated this usage. A similar program on a server is called a servlet.
Macromedia Flash is another widespread applet nowadays that provides motion graphics, interaction and sound.
Applets tend to have some form of user interface. This distinguishes them from a program written in a scripting programming language (such as JavaScript) that also runs in the context of a larger, client program, but which would not be considered an applet.
Applets generally have the capability of interacting with and/or influencing their host program, although they are generally not required to do so.
The applet is written in a compiled language, while the scripting language of the container is an interpreted language, hence, the greater performance or functionality of the applet.
The applet must run in a container, which is provided by a host program, or through a plugin, or a variety of other applications including mobile devices that support the applet programming model.
Applets generally have the capability of interacting with and/or influencing their host program, through the restricted security privileges, although they are generally not required to do so.