In X and Y, there is a Pokemon named Agislash. He has a signature ability called Stance Change. It has a description that says: "The Pokemon changes form depending on how it battles." What exactly does that mean? Does it swap Offensive Capabilities with Defensive?
Aegislash changes form dependant upon the moves it uses.
If Aegislash uses a King's Shield, or enters the battle, it goes to Shield Forme. Sheild Forme has higher defense and lower attack.
If Aegislash uses a damaging move, it goes to Blade Forme, swapping its base Attack with it's Defense, causing it to have a higher Attack and lower defense.
It's also note-worthy that moves that call other moves do not change Aegislash's form, even if they call a damaging move.
Stance Change is activated independently of sleep or confusion, and will therefore cause a change in stance even in either case. It can also not be traced, copied with Role Play, suppressed with Gastro Acid, or replaced with Simple Beam, Worry Seed, Entrainment, or Skill Swap. Obtaining Stance Change through Imposter on will not allow the other Pokemon to transform.
When Aegislash swaps he is in shield forme. When he uses a damaging move it switches to blade forme. He basically switches his defense and his attack stats.
King's Shield makes him revert back to shield forme.
Sword Dance, Iron Defense and the likes do not change his forme.
Also as an aside. DO NOT include sword dance in his moveset. Because when he switches forme it basically increases his defense instead. So use iron defense, when he switches forme it actually improves his attack.