White areas on a Layer Mask are transparent and black areas hide that part of the image completely. Grey areas partially hide the image.
New layer masks are created white, which means they are transparent. Paint on them in black to hide parts of the image.
If you create a Layer Mask while a Selection is active, then the Selection will be applied to the Layer Mask in black.
You can paint on a Layer Mask in black or white while a Selection is active and the paint will only apply to the selected areas. Similarly you can add or subtract from an existing layer mask by doing this.
You can create a new layer mask in black by holding down the ALT key while it is created. Black masks show nothing of the image. Paint on in white to reveal parts of the image.
You can apply a layer mask to the image. The option is in the menu which appears by right clicking on the mask. The mask then disappears.
Regular layer masks show up in black and white and vector masks in grey.
Apply a Layer Mask is available by right clicking the Layer Mask. This reduces the size of the image to the size of the mask and removes the layer mask. Great for just selecting a small part of the image.
Apply Image can be applied to a Layer Mask by first selecting the mask and then Menu > Image > Apply Image. Any effect is then selectively applied to the lighter areas.
The Properties Window for a Layer Mask has some useful options with sliders for Density and Feather, as well as shortcut buttons to Select and Mask and Colour Range Tools.
Use CRTR + A on the mask to select all, then ALT + BACKSPACE will fill it with black, alternatively CMD + I will do the same.
To copy a layer masks onto another mask use ALT + CLICK and drag it to the new position to copy it over.
ALT + Click opens the mask to view it and edit it and again to close it.
SHIFT + CLICK toggles a mask on and off.
CMD + CLICK selects a mask and makes the selection live.
ALT + Create Layer Mask produces an inverted layer mask, which is black, so nothing shows through.
Editing Layer Masks and Channels
Layer Masks and Channels are just images that happen to consist of only black, white and shades of grey, and can be edited with many of the tools that other images can be edited with.
The Levels Adjustment is usually the most suitable tool to edit the mask with, as you can control the white, black and mid-grey points with sliders to increase contrast.
Clean up a mask using a brush in Overlay Blending Mode. If you paint with black it will selectively paint over the dark grey areas making them blacker and not touch the light greys or white areas. Similarly painting white over the light grey areas makes them whiter without affecting the dark greys and black. Hence you do not need to be particularly selective in where you paint.