Layers are probably the single most important addition to Photoshop , but layer masks are a close second. I would say that until you thoroughly understand how and why to use masks, you simply don’t understand the power of Photoshop.
Layers are probably simply best described as individual sheets of transparrent paper. If you were to draw or place a seperate image on these sheets, you could quickly build up one image by placing these 'layers' on top of each other. Compositing.
There are two primary types of masks: clipping masks and layer masks.
The term “mask” isn’t immediately understandable to someone outside the realm of graphic design.Layer masks and clipping masks are closely related , but very different in application. Let’s start by discussing layers masks, which are generally what people are referring to when you hear them discuss Photoshop masking.
A layer mask is something that you apply to a given layer to control the transparency of that layer or a specific item on that layer. This is what you would use to remove an object from view.
You are just masking the object from view.
When you add a mask to a layer, On this invisible 'sheet', you can then paint white, black or any level of gray in-between. The color that you paint tells Photoshop whether to make this visible or invisible from view. Painting black on a layer mask will remove the image. But unlike just simply deleting this destructively and permanently from your image, you can paint over the area again with white, and the area will be shown again. This is why you mask when editing images instead of removing or deleting.
At its simplest definition a mask is a way to apply something to a very specific portion of an image, 'masking' part of the image from view, like erasing; but importantly, unlike erasing, the edit is not permanent and can still be changed at any time.
Clipping masks are very similar to layer masks only they use one layer to determine the transparency of another. In this scenario, you stack two layers on top of each other with the bottom being the determining factor of the transparency of the top.
Its harder to explain without an example. See the below images: