The Extract filter provides a sophisticated way to isolate a foreground object and erase its background on a layer. Even objects with wispy, intricate, or undefinable edges may be clipped from their backgrounds with a minimum of manual work. You use tools in the Extract dialog box to specify which part of the image to extract.
When you extract the object, Photoshop erases its background to transparency. Pixels on the edge of the object lose the color components derived from the background, so they can blend with a new background without producing a color halo.