Garbage Matte?

I have been doing some research on blue/green screen with Blender compositor and I keep hearing about garbage mattes. How do you do garbage matte? I know how to block 3D stuff from a composite, but how do you block out garbage from 2D video?

Here you go: