If masking of hair were easy, everyone would have tutorials on the topic. As it turns out, there are several ways to mask hair, depending on the contrast between the subject and the background as well as other factors such as the amount of hair and its texture. But in any of the methods that I've found, there is no shortcut to getting around a bit of painstaking work.
In my example, I'm using my little dog Penny. The background is not uniform, as backgrounds seldom are, and the contrast is not very great between the dog and the couch.
This was a difficult tutorial to do because i was not happy with the way it came out the first couple of times i did it. I prefer, for this subject, the results that i got using the background eraser and that is the one i will present here.
File -> open and choose
your file. Drag the layer in the layer palette down to the new layer
icon to duplicate this layer. I'll call this the "dog copy layer".
b. Click the new layer icon to make a blank new layer and fill it with black. If your subject were dark in color, you would want to use white for this layer. Drag the solid black layer below the dog copy layer. This black is so that you will see that you are doing a thorough job of erasing. You may have to touch up more when you get the subject against your desired background, but this will help.
c. File -> Save As and name your file something new.