The procedure involved subtly altering key lines of text of a linking book, not altering itself but rather partially severing its connection. The changes needed are so slight that anyone unfamiliar would overlook them. The Gateway Image would look proper, however anyone who would use such book, would be permanently trapped in the dark void of the Link. However if someone else use the Book, they would switch places, thus freeing the former prisoner (but at the cost of trapping oneself).
Atrus discovered that technique during a hunting expedition through the ruins of D'ni City with Gehn. He found a formula but as he feared that Gehn would confiscate once more his discoveries, he decided to leave the document behind. Years later, however, wishing to find a way to safeguard the Myst Library from greedy explorers, he managed to recall most of the formula, and recovered it with little experimentation.
According to the Myst scenario, the Red and Blue Books are Trap Books, and after Atrus left for D'ni, Sirrus and Achenar had eventually been trapped in the inter-Age void, while looking for more Ages to rule. They sought for the Stranger to find the 5 pages in order to link to the books, thus freeing the brothers, while s/he'd be trapped there. This is seen in the two of the losing scenarios.
Some fan theories tried to reconcile these: At the end of the Myst game, it is believed that the brothers were indeed trapped in the void, but Atrus before burning the trap books, rewrote them back into into normal linking books, and the brothers each finally linked to their respective prison Ages (i.e. ages with no linking books in them).
In Riven, Atrus' journal makes an analysis of what Trap Books are, and an essential puzzle for trapping Gehn, includes this exclusive property of Trap Books, getting trapped while switching places with another. Finding a way to incapacitate Gehn, Atrus tapers with a linking book to D'ni. At first Gehn puts the player to link to D'ni to check if the book is safe. The Stranger is indeed trapped there, but Gehn eventually can't resist and decides to link there himelf, freeing the Stranger.
These events are explained by Cyan Worlds as artistic license, as well as the communication through the Gateway Image.
The switching of places between Gehn and the Stranger in Riven can not be explained unless the book used was a trap book and not a prison book; however, Atrus could not have subsequently sent Gehn to a prison age in the same manner as his sons because that particular trap book was made from a D'ni linking book, and converting it back would release Gehn there. Under this theory, Gehn thus remains in the void indefinitely. The trap book used to capture Gehn was presumably slightly different to the two encountered in Myst; unlike the latter, the former evidently continued to show a normal linking image even after it held a person, otherwise Gehn would subsequently not have used it himself. Another theory is that Atrus didn't need to rewrite the prison books, but rather the destruction of the books forced Sirrus and Achenar into their respective prison Ages. This means that Gehn would remain in the void so long as the D'ni prison book remains in tact.
After the production of Riven, Cyan Worlds (specifically Richard A. Watson) announced that Trap Books are not canonical and the D'ni did not have the power to write them. Instead, he revealed that Trap Books are merely Prison Books and that Cyan did not want to reward the player for losing the game. This information was given in an e-mail written by Richard A. Watson, who was the first official mouth to dismiss the established canon set forth by the games. Watson mentioned that trap books were added in to help the gameplay. Rather, the trap books link to prison ages (Spire and Haven, in the case of Sirrus and Achenar), though the first two games show them as black desolate ages, due to Cyan not wanting to reward the player for getting a bad ending.