An unsharp mask does not detect edges the way a person would. It creates a deliberately blurred copy of the image, then subtracts that blurred copy from the original. Wherever the image was already smooth, the original and the blurred version are nearly identical, so the subtraction produces almost nothing. Wherever there was a real edge, the blur smeared it out, so the original and blurred versions differ sharply right at that boundary, and the subtraction isolates exactly that boundary. That isolated difference is then scaled by the Amount and added back onto the original, which is why it is called an unsharp mask, the mask itself comes from a blur.
This is also exactly why sharpening can create a visible halo. The technique works by increasing contrast right at an edge, a thin dark line just outside the edge and a thin bright line just inside it, or the reverse depending on which side is lighter. At a reasonable Amount this reads as crispness. Push it too far, or set the Radius wider than the detail actually calls for, and those thin lines become visible on their own, especially against a plain background like sky or a wall. Halos are frequently only visible once you zoom in past normal viewing size, which is the entire reason this tool includes real zoom and pan on the preview rather than only a fit-to-screen view.
Why sharpening should be the last step, not an early one
Resizing an image down averages neighboring pixels together, which softens fine detail as a direct side effect, even with a good resizing algorithm. If an image is sharpened before being resized, a lot of that sharpening gets smoothed right back out during the resize, wasting the effort and sometimes leaving behind faint sharpening artifacts that the resize did not fully erase. Doing it the other way, resizing first with the resize tool and sharpening last, means the sharpening is calculated against the actual final pixel grid the image will be viewed at, which is what the edge detection in an unsharp mask is built to respond to.
Why luminance-only sharpening exists
Sharpening each color channel independently can shift color slightly right at an edge, since red, green and blue rarely have identical contrast at exactly the same location. The fix used by most professional software is to convert to a luminance and color space, sharpen only the brightness channel, and leave color untouched. This tool reaches the same result more directly: the sharpening amount is calculated from luminance, and that same amount is added equally to red, green and blue, which produces an identical result to the full conversion without needing the extra step. It is on by default because there is rarely a reason to prefer the alternative.