Guard Swap switches the user's Defense stat stages and Special Defense stat stages with the target's Defense stat stages and Special Defense stat stages. Since this changes stat stages, the stat stages can be passed via Baton Pass.
In Explorers of Time, Darkness and Sky, Guard Swap is a move with 11PP that ignores accuracy and evasion checks. The user targets Pokémon in the front, ally or enemy, while also cutting corners. The user and target swap Defense and Sp. Defense stat boosts as well as multipliers from Screech. This move is affected by Taunt.
It switches existing changes to your Defense and Sp. Def with the target.* It switches any changes to your Defense and Sp. Def with the target's. The stats return to normal when you go to the next floor or step on a Wonder Tile.*
In the manga
The user takes some of its Special Defense stat and adds it to its Defense stat.