Layer Masks are resolution-dependent bitmap images that are edited with the painting or selection tools.
Once you expand the Layer Mask menu, you will see a list of options such as “Reveal All”, “Hide All” and so on. In this tutorial, we will start with the first two options.
Now Load any image into Photoshop, press Ctrl + J to duplicate the background layer then fill the background layer with black colour then click on the “Reveal All” option:
As you can see, there is now a white layer mask being linked to this layer, as shown below:
Now Right-click on the layer mask you just added, and choose “Delete Layer Mask”:
Go back to Layer > Layer Mask and choose “Hide All” option this time:
Now instead of a white mask, you will a black mask being attached to this layer, and in the mean time the image will become invisible on the canvas:
Additional Masking Options
Have a try with those settings and see what result they bring you
Use Soft or Hard Brush Tool to Paint on Layer Mask
On the canvas: