Masking Tutorial 101:
Photoshop Basics: Masking (aka the holy grail)
Erasing in photoshop isn’t a bad thing, but sometimes you don’t always get the blend right, you don’t get those ‘whispy tendrils’ in hair, and it can lead to some frustrating times trying to ‘cut things out’. ‘Masking’ is a technique that has many uses, from changing colors, to erasing, to blending images beautifully, with the bonus of being able to undo whatever you happen to do, instantly, without messing up your image or having to go back and cut out or erase things all over again!
So lets get down to it!
Start with two images (can be any image, we’re going to try and put the ship in the background of ole Gannicus here).
First, you want to ensure you’re on the layer at the top that you want to ‘blend in’ and then click on the ‘add layer mask’ button as shown below.

Which adds a layer ‘mask’ to it (its a white box attached to it) like this.

When you have this layer and you click on it, your color palette for your brushes changes to black and white, as shown in the image. This is where the magic happens.

If it isn’t black and white, simply change them.
First thing to remember, is you want to ensure that you’re on that particular portion of the mask while you’re doing your painting (meaning you want to have the mask layer selected and not the actual picture). From there, what you do, is take the BLACK paintbrush, and begin painting over the portion of the image that you want to ‘erase’ bringing out the background (or bottom layer) as shown below. You can see this is in action on the right hand layer palette, as black begins to appear on the masking layer, and your image begins to ‘erase or fade’ into the background. This way, you’re not actually touching the underlying pictures AT ALL. They’re still there. If you happen to go to the layer pallete where you see your mask and RIGHT CLICK on the masking layer, and disable or delete it, your image is still there, completely in tact. You literally cannot mess up your original image, as long as you’re working on the masking layer. You can paint in/paint out as much as you want.
Below is an example of being on the masking layer, and painting over it with the black brush where you see the ship disappearing behind Gannicus.

The beauty of masking, is when you make a mistake, or want to fine tune something. Simply swap your color brushes from the black to white, and use the white to begin painting back over the portions of your image you want to ‘reappear’ as shown below. (Again, ensure you’re active layer is the actual ‘mask’ portion otherwise you’ll find yourself painting black or white on the actual image).

From there you can do this with as many images as you like, in any order that you like. You can overlay images one on top of the other before ever applying the ‘mask’ and you can do it to anything. Font. Styles. Colorings. Layer on top of Layer, Etc. You can change your brush sizes and blow up the images to get in there for fine details, or use a softer brush (protip: softer brushes overlay things nicely around hair and models).
There’s a myriad of things you can do, but once you do it once, on an image, and see it in action, then the rest will come naturally with something to experiment with. You might still want to ‘erase’ or ‘cut out’, and there ARE times that call for that, but hopefully this will bring about some new thoughts, tips and tricks, and make that blending easier!
Masking in Action:
Below is a video of a quick two minute tutorial on masking*, showing the color changing on a car. Some of the language He uses involves hot key commands and shows a couple of little pro-tips and tricks for cleaning up your mask, but its exactly the same concept.
*credit to @Tutvid on youtube for the Breakdown Video.