The personality transfer device is one of Ma'chello's many inventions discovered on P3W-924. Gripping the handles on both sides of the device causes the personalities of two individuals to switch bodies.
The aspects that make up an individual's personality, memory, and conscious self, are derived from unique networks of neurons in the cerebral cortex. The device remaps one set of unique neural networks onto another, causing the personalities to switch. It encrypts every transference, and retains a memory, making reversal impossible.
The device was brought back to the SGC after the personalities of SG-1 were accidentally transferred. In order to override the encryption and return each individual to his own body, the personalities had to be retransferred in a pattern that did not require reversal.
A summary of personality exchanges:
Daniel <--> Ma'chello
--> Daniel in Ma'chello & Ma'chello in Daniel
Cross Reference: Ma'chello, Ma'chello's Inventions, P3W-924
Episode Reference: Holiday