Welcome
levon!
Yep, this is one of the most difficult things to convincingly accomplish! As to how realistic you want your extraction to be will inevitably be dependent on how much time and effort you are willing to put into the job and how important the job is.
Various situations will call for various different techniques and as you play with those that have been posted here, you'll come to know what method works best, dependent on the complexity of the background and the amount of hair "whispies" involved.
The only other "tip" I would offer up to
Captain Chickenpants' method and
markzebra's tips (where the detail of the hairline is concerned) would be to also try hand painting the finer whispies that fade into the background and then use a blur brush to blend. Play with opacities and strengths. Naturally, you'll be working at 1600% magnification if using 1 pix brushes. For this kind of finer detailed work, I've also favoured using the smudge and eraser...again, playing with various strengths and opacities.
It may seem like painful and tedious work, but it's this kind of extra effort and attention that produces natural and realistic results!
How far you wish to go with this, is strictly up to you!