Background removal is an image segmentation problem: for every pixel, decide how much of it belongs to the subject.
From pixels to a mask
The model outputs a greyscale map the same size as your photo. White means subject, black means background, grey means partly both — exactly what soft edges need.
Why hair is hard
A single strand of hair is thinner than a pixel and blends with whatever is behind it. Good models predict fractional values there instead of a hard yes/no.
Where humans still help
Ambiguous cases — a bag held away from the body, a reflection, a shadow — need a person to decide. That is what Magic Grab and the brushes are for.
For fine detail work, read the hair guide