Often as part of the production pipeline it is known in advance that certain scenes will be composited and these scenes are thus filmed with the compositing process in mind using a bluescreen or greenscreen. In fact any color can be used for color or chroma keying, but with human subjects epsecially there tend to be more reds, oranges, yellows and purples in the human skin tone than blues or greens, and so keying with those colors tends to remove the very subject one is trying to display. If you had a lot of blue-green elements you were trying to pull instead of the more common video footage of people, you might consider using an orange background color - in other words, a complementary color to the one you are trying to isolate and bring to the foreground is going to produce the best resulting image.
The two main types of keying are color keying and luma keying. Color keying is the type used with the color background such as bluescreening we discused above. Luma keying creates a matte based on lightness or luminance, and is less often used.
We are fortunate in that most compositing packages include a variety of keying tools that make this process easy and accurate. We are going to go over these tools and practice using them.