The process is the same as image background removal, applied to every frame. The video is decoded into individual frames, each frame goes through the segmentation model, the resulting masks are used to composite the subject over a new background, and the frames are re-encoded into a video.
The quality of the result depends on the model and on the consistency of the subject across frames. A model that produces a clean mask on frame one but a slightly different mask on frame two will produce visible flicker when the frames are played back in sequence.
Modern models are temporally stable enough that flicker is not a major problem for talking-head videos. For fast motion and complex subjects, it is still noticeable.