Lets say you had an actor sitting on a bench in front of a greenscreen and you wanted him to "appear" as if he was at a park; You would film the actor in front of a greenscreen. Then, you would bring that footage into a decent compositing program and use chroma keying effects to isolate JUST the actor. In effect you are telling the software package to erase ALL green from the image. So, you would make sure the actor is NOT wearing any type of green. If he or she is, when you use the software to take the green out of the entire image, more than just the backdrop would disappear. So would the parts of the actor that was covered in green.
Now, once you've isolated the actor, there will be nothing but black surrounding him now. you would then layer the footage of him or her, on top of the park footage. Granted, this is a barebones description of the technique. You must realize that it is a very tricky business and is something that is avoided if at all possible. The reason, besides the technical hassles of Chromakeying an image, can be difficulty lighting the actor to match what it would look like in a park. This is one of several things that can go wrong.
Also, you have to be aware that there are many more ways to skin a cat. Greenscreen isn't always the best way to go. You can also use a blue screen, sometimes you'd want to use an all white background and pull what is called a luma key. Luma...short for LUMINANCE which is a measure of white.
As with anything, practice makes perfect. I hope my explanation made sense.