The Assistant's Revenge is a transposition illusion in which two performers change places. It was created by magician and inventor Robert Harbin.
Assistant's Revenge Wikipedia
One of the two performers, the restrainee, is placed in a standing position in a large frame and restrained there with various straps, manacles, chains and locks. The second performer, the restrainer, circles the frame, drawing a curtain first across the front, and then around one side and the back. Almost as soon as the restrainer disappears behind the frame, the restrainee appears from the other side of the apparatus, drawing back the curtain as he or she comes. This reveals the restrainer now restrained in the frame; the two seem to have changed places by magic.
In practice, the roles of restrainer and restrainee have been interchangeable between magician and assistant. Sometimes it begins with the assistant restraining the magician, with the implication that in this way the assistant is gaining "revenge" for all the other tricks they do where the assistant is put in a box. However it is also performed with the assistant being restrained at the beginning and emerging at the end to with the magician restrained as "revenge" for the opening part.
This trick works because of a latch allowing the restrainee to come out from the back of the frame and switch places with the restrainer. Because it is hidden by the curtain, it looks like they magically switched places.