Each person may or may not be wearing the next/previous person’s clothing underneath, but it’s clear that there’s a mask that was drawn frame-by frame at the edge of the grament that’s coming on or off. If someone is pulling something up and off, you draw a mask around the clothing, following it up as the person removes. You then have the footage of the next person below. If the next person is a little too wide, you have their arms behind the back, or use something like bezier warp to make them narrower, gradually getting wider as the upper layer clothing is removed.
And the talent would be shot on greenscreen, with the background added later.
Basically, it’s rotoscoping, which is drawing a mask by hand.