The file format is irrelevant. It is the same process no matter which format you load.
Basically you will open the first image, then place the second so you have two images, one on each layer.
a
Next you will create a selection on the top layer (the image you want the head to be removed) (The layers can switch place by dragging them)
Next is to create a mask by clicking the icon at bottom of layers panel that looks like a circle inside a square.
You can now use refine edge to adjust the edge of the mask if necessary
Because the mask is an 8-bit greyscale image you can do almost any thing to it you can any other image within reason. This means the mask can be inverted, filters can be used, painted on, etc. However it is a single layer image that can not contain any additional transparency, so layer adjustments, styles, live text, and vector shapes are not allowed.
Keep in mind however saving as a gif will limit further what can be done. Since it is an 8-bit format with only a single bit for transparency. Therefore save as a psd or tiff first to allow you to edit later if necessary.
In the save for web dialog box, it will allow you to specify what color will be used for the transparency. In other words anyplace that was transparent in your image will be filled with that color for the gif only. So any feathering or blending from opaque areas to transparent areas will be a sharp edge.
This is why it is a good idea to save as a psd or tiff so you can change your mind later.