In photoshop masks can be a great tool to easily show and hide parts of a layer without erasing in the actual layer. So if you make a mistake or you want to change it later you can do this without going back in your history and also deleting other actions you did.
Understanding how masks work I will just show you how to add and use them.
I will be adding a cloudy sky to this tree picture.
At first we will put the two pictures in a photoshop file on top of each other.
With layer masks you can show and hide parts of a layer, we want to do this on the sky layer. So, we will add the mask to the sky layer.
You do this by clicking the add layer mask button, it will show a white layer next to the sky layer.
We will change the layer mode to Darker color so the underlaying picture will also show when parts of the two layers overlap.
Take the eraser on 20% opacity, and start erasing on the parts where u actually want your sky to show. when nothing is happening just change your foreground and background color by hitting the spacebar + X.
You can see how the sky is shown where the mask is white and hidden where it is black, the opacity is shown in gradients of gray.
You just keep hiding and showing by erasing in the mask where you wan’t the sky to be seen. It will be easy to change what you did without going back or not be able to show the sky again after you erased it.
Small note: if you’re adding sky’s to your pictures it’s best to add them before you do the rest of your processing to create a more realistic result.