A layer mask is to mask (hide) or show the image at the level it is or the image below.
Click on the screenshot to make it bigger
In this example 2 layers (normal layer) and 1 layer mask attributed to the top normal layer
I did draw a black and white gradient on the mask (AKA Layer-mask).
as you can see the white part of the gradient shows the top layer where the mask is
The black part of the gradient shows the layer below
Pretend that the white part of the mask is the "light" and light up the layer part (the top one), here the rainbow on the left side
Pretend the black part of the mask id the LACK of light, it's darkness, thus it does not light the right part of the rainbow, so you can see below it (the layer below)
the white is the light => Opacity because you cannot see thru (on the left)
the black is darkness, no light = Transparency because you can see thru (on the right part)
in the middle it's different gray scales, thus it's half transparent more or less depending how dark or clear is the black and white gradient
I hope this help, not sure I explained intelligibly
Click on the screenshot to make it bigger
In this example 2 layers (normal layer) and 1 layer mask attributed to the top normal layer
I did draw a black and white gradient on the mask (AKA Layer-mask).
as you can see the white part of the gradient shows the top layer where the mask is
The black part of the gradient shows the layer below
Pretend that the white part of the mask is the "light" and light up the layer part (the top one), here the rainbow on the left side
Pretend the black part of the mask id the LACK of light, it's darkness, thus it does not light the right part of the rainbow, so you can see below it (the layer below)
the white is the light => Opacity because you cannot see thru (on the left)
the black is darkness, no light = Transparency because you can see thru (on the right part)
in the middle it's different gray scales, thus it's half transparent more or less depending how dark or clear is the black and white gradient
I hope this help, not sure I explained intelligibly
Patrice