Masking out hair is often one of the most challenging and time-consuming tasks that a retoucher can have. This incredibly handy tutorial by Nathaniel Dodson of tutvid demonstrates how to cut out hair effectively in a short amount of time.
Start by using the Quick Selection Tool to drag a selection around the subject, holding down the Shift key to add to the selection, or the Alt / Option key to subtract from your selection. Once you have your basic selection, refine it by clicking on Select & Mask on newer CC versions of Photoshop. Within Select & Mask, choose the Refine Edge Brush, resizing as needed, and run it over the edges of your selection. Photoshop will take a reading of those local pixels, and attempt to clean up the edges appropriately.
Once you are satisfied with the cleaned up selection, you will want to push a slight amount with the Feather slider (around 2.5% in the video), and up the Contrast slider to about 20%. If there are still some edges that need a little maintenance, select the Brush Tool to paint them back into the selection. It is recommended to have a little more, rather than a little less of your selection, to make the following steps more effective.
The next step, underneath Output Settings on the right side of the window, is to Output to a Layer Mask, and click OK. With your subject now cut out, in a layer mask, over a transparent (checkered by default) background, you will want to place in a background image to review the quality of your cut-out.
This next tip that is the one that makes all the difference when dealing with the edges of hair. It involves selecting the Brush Tool and ensuring that you have the Layer Mask selected. Change the Brush Mode to Soft Light, and set your foreground color to Black. Paint on the edges of the subject, particularly areas where there may be some fringing, and you’ll be amazed at how well this will trick performs.