In graphics, keying is an informal term for compositing two full frame images together, by discriminating the visual information into values of color and light.
A chroma key is the removal of a color (or small color range) from one image to reveal another "behind" it. The removed color becomes transparent. This technique is also referred to as color keying, colour separation overlay and bluescreen.
The principal subject is photographed/filmed against a background having a single color or a relatively narrow range of colors, usually in the blue. When the phase of the chroma signal corresponds to the preprogrammed state or states associated with the background color(s) behind the principal subject, the signal from the alternate background is inserted in the composite signal and presented at the output. When the phase of the chroma signal deviates from that associated with the background color(s) behind the principal subject, video associated with the principal subject is presented at the output.
The best known example is television weather broadcasts, where the meteorologist is filmed in front of a flat, even colored green (or blue) screen. The background color is removed electronically, and replaced with a computer graphic map which the meterologist points to (by glancing at monitors hidden off-camera). The background color, of course, must not also appear as part of the meteorologist's clothing, else one might see, for example, the heart of Texas deep in the heart of the forecaster! With better imaging and hardware many companies are avoiding the confusion often experianced by weather presenters by lightly projecting a copy of the Colour Separation Overlay (CSO) image onto the CSO blue/green background. This allows the presenter to accurately point and look at the map without refering to the monitors.
Chroma keys are done most commonly in front of a bluescreen or greenscreen, because those colors are easiest to avoid in clothing and flesh tones.
This effect can be implemented in hardware or software. Software is eg. part of Adobe Premiere Pro.
The most difficult part to setup a blue- or greenscreen is the even lighting and the avoidance of shaddow, because an as narrow as possible range of blue (or green or other) color is made transparent, a shaddow would change that to a darker color.