The Transparency mask allows you to selectively show or hide parts of a layer. By using a mask, you are able to avoid deleting parts of an image that you just might want in the future. This allows you to work non-destructively.
In addition, it allows you to do things like remove a portion of a layer in the layer stack so you can see what's behind it. One example would be if you wanted to replace a sky, but were unsure of how much you wanted to replace.
How to add a transparency mask¶
Click on a paint layer in the layers docker.
Click on "+" drop-down in the bottom left corner of the layers docker and choose.
Use your preferred paint tool to paint on the canvas. Black paints transparency (see-through), white paints opacity (visible). Gray values paint semi-transparency.
You can always fine-tune and edit what you want visible and any layer. If you discover you've hidden part of your paint layer accidentally, you can always show it again just by painting white on your transparency mask.
This makes for a workflow that is extremely flexible and tolerant of mistakes.