Modern compositing has become quite sophisticated. Essentially all you're doing is allocating a particular colour to be "invisible". The familiar "chroma blue" and "chroma green" have been used traditionally but it will work with any colour. The reason those colours have traditionally been used is because they're quite unnatural colours so it's easier to avoid having anything in that shade that you want to keep. Green works better than blue because it's a slightly shorter wavelength (therefore there's less "spill" from the green screen onto your foreground elements and it's easier to maintain lighting separation to avoid those horrible green glow outlines). However if you're shooting natural scenes like, say, a forest, you have to use blue or the trees might disappear too!
These days it goes way beyond mere cycloramas though. Keying can be used on virtually anything you can imagine even individual people or individual limbs. If you've seen "Spartacus: Gods of the Arena" the opening "kill" of episode 1 when a guy gets the top of his head cut off was done by combining one pass of a guy with a greenscreen skull cap and a second of the same performer in a green screen suit save for the top half of his head. (Plus a plate pass as well, of course).