The Fal-tor-pan, also called "the refusion." was a ritual known to the Vulcan race.
It was a synaptic pattern displacement technique that only trained members of the Vulcan people, such as the High Priestesses of Mount Seleya, are capable of accomplishing. The purpose of the ritual is to reunite the katra of a Vulcan with their body.
The ritual is considered very dangerous to perform and has therefore been done only in a very few cases. This is because of the fragile state of both the recently deceased person and the keeper of the katra itself.
Legends and stories state that the Father of Logic, Surak, had once been killed personally by the hands of the tyrant Sudoc. However, his life continued due to the fal-tor-pan ritual which was conducted by Nirak who transferred his mind into a new body. (Last Unicorn RPG module: The Way of Kolinahr: The Vulcans)
T'Pau attempted to use a variant of this ritual on Captain Jonathan Archer to remove the katra of Surak. She intended to house Surak's katra, however Surak was unwilling to leave the mind of Jonathan Archer. Once Archer and T'Pau were able to stop Administrator V'Las from starting a war with Andoria, Surak allowed himself to be removed from Archer's mind, and was taken into the mind of the same Vulcan priest that married Koss and T'Pol. (ENT episodes: Awakening and Kir'Shara)
Over a century later, the first successful Fal-tor-pan in modern history was performed when the katra of Spock was taken from the mind of his shipmate Leonard McCoy and reunited with his regenerated body in a ceremony at Mount Seleya in late 2285; while both Sarek and McCoy acknowledged the dangers of this ritual, Sarek admitted that his logic was uncertain where his son was concerned, and McCoy concluded that he had come too far to withdraw now. Over the next several months, a series of mind melds were performed between Spock and McCoy to ensure that any remaining trace of Spock's katra in McCoy's mind was transferred back to Spock's mind. Three months after the Fal-tor-pan was performed, Captain Spock had returned to active duty in Starfleet. (TOS novelizations of Star Trek III: The Search for Spock and Star Trek IV: The Voyage Home)