It works just like stacking up papers. If you cut a hole in a white piece of paper, and lay it over the top of a black piece of paper, the black will show through where you cut the hole.
The white paper is your foreground. The hole is the area removed by the key. The black paper is your background underneath.
So, any areas removed from your foreground layer, whether you remove them with a key, a mask, or any other means, will reveal whatever layer is below.Link.