Blue and green screen are used to produce a chroma key which is a matte for video.
Mattes are one method of controlling transparency in video. Another method is masking or rotoscoping the video.
Think of transparency as a window through which you can see whatever image/video (or portion of an image or video) you wish to place there.
Green screen is used during production or shooting the video, chroma keying (of keying for short) is used in post production.
In other words you want to isolate a portion of your video and therefor you shoot it against a green screen to apply a chroma key in post production and remove the green to make a matte for the footage.