You can use masks to hide portions of a layer and reveal portions of the layers below. You can create two types of masks:
Layer and vector masks are nondestructive, which means you can go back and re‑edit the masks later without losing the pixels they hide.
In the Layers panel, both the layer and vector masks appear as an additional thumbnail to the right of the layer thumbnail. For the layer mask, this thumbnail represents the greyscale channel that is created when you add the layer mask. The vector mask thumbnail represents a path that clips out the contents of the layer.
When you add a layer mask, you need to decide if you want to hide or show all of the layer. Later, you'll paint on the mask to hide portions of that layer and reveal the layers beneath. Or, you can create a layer mask that automatically hides a portion of the layer by making a selection before creating the mask.
To add a layer mask that hides part of a layer