A screensaver is a computer program originally designed to conserve image quality of computer displays by blanking the screen or filling it with a moving image or pattern when the computer is not in use. Today, screensavers are primarily for entertainment or security purposes.

A computer screen is usually a CRT (cathode ray tube). This means that images are generated using electron beams which are "launched" from the back of the monitor and "draw" images continuously on the screen. Most computer programs paint images in the screen. Some of these images (letters, pictures, animations, menus) are usually moving or changing, and never stay in the same place for long. But some portions of the screen (like the Start bar in Microsoft Windows, or the typical upper "score" bar of some videogames) are always in the same place, sometimes for hours or even days or months. Particularly with older CRTs, these sorts of images, continuously drawn in the same place for a long time, could damage the screen because the electron rays are always hitting the same point of the screen. Damage would consist in poor image quality, and those fixed images could remain "burned in" to the same place like "ghost lines" even if the image eventually changes. You could observe this effect in some old classic videogame machines; after some years showing always the same images, many of them feature those "ghost images".

Screensaver programs were originally designed to help avoid avoid these effects by automatically changing the images on the screen when the computer is not in use. They can be usually set up to launch automatically, waiting a specified number of minutes after the last keystroke made by a user. Then the screensaver could switch the image to black, or maybe make some animation effects with images and colors, thus avoiding any "fixed" images. The screensaver remains active until a user enters a keystroke or makes a mouse movement. At that moment, the screensaver closes and the former screen contents are restored, to allow the user to work again.

Modern computer displays are much less susceptible to burn-in than older models. For this reason, screensavers today primarily are decorative or for entertainment, and usually feature moving images or patterns and sometimes sound effects. Screensaver software also has been adapted to serve some useful purposes. For example, many screensavers can be programmed to ask users for a password for security purposes ("lock the workstation"), before permitting the user to resume work. In addition, some screensavers activate a useful background task, such as a virus scan or a distributed computing application.

Screensavers are not to be confused with power management features, which place the computer in a low power state after it has been idle for a specified amount of time.