BG remove is powered by a class of AI models called segmentation models. They were trained on hundreds of thousands of images where the subject and background were already labeled. Through that training, they learned to recognize the visual patterns that separate foreground from background.
The core architecture is a neural network that processes the image and outputs a mask. The mask is a grid of values, one per pixel, that says how confident the model is that this pixel is foreground.
The mask goes through a post-processing step called alpha matting or edge refinement. This is where the model handles hair, fur, and soft edges. Without it, the cutout has a jagged outline. With it, the edges are smooth.
The result is applied to the original image. Background pixels get alpha zero. Foreground pixels get alpha 255. Transition pixels get values in between.