Add Layer Mask
This command creates a layer mask for the active layer.
If no pixels are selected when you choose this command, the layer mask is filled with white.
Otherwise, the layer mask is white within the selection and black outside the selection. In this way, the selection defines which parts of the layer are visible.
You can edit a layer mask in much the same way as you would a normal layer: click on the layer mask icon to activate it and paint on the layer mask using the brush or any other paint tool. To apply the layer mask permanently, right-click (Windows) or Command-click (Mac OS) on the layer mask and choose Merge Layer Down.