A Keychain (キーホルダー Kīhorudā?, lit. "Key Holder") is a magical piece of equipment that modifies the appearance and abilities of a Keyblade. In Kingdom Hearts 358/2 Days, the Gear Panel function replaces Keychains. Likewise, the Card system replaces Keychains in Kingdom Hearts: Chain of Memories. Cards, however, do not affect appearance, only ability.
The Keychains have the ability to change a Keyblade's stats, grant it special abilities, and give it a new appearance. While most Keyblades have a basic form, like the Kingdom Key, a Keyblade wielder can upgrade and change the form of the Keyblade with a Keychain. In other words, when Sora or another wielder is equipping a "new" Keyblade, he or she is equipping a different Keychain to the Keyblade, changing its form.
It has not yet been explained exactly what a Keychain is and why it has the power to transform the Keyblade. A wielder usually receives a Keychain after "completing" the events that transpire within a world.
But the Keyblade wielder is not shown receiving the Keychain from anyone, save for when Tifa hands Sora the Fenrir Keychain after defeating Sephiroth, and when Kairi hands Sora her Wayfinder, which turns out to be the Oathkeeper Keychain. Plus the few keychains that are found in chests. These Keychains are often modeled after elements of the world from which they are received in some way.
Sometimes, a Keyblade does not possess a Keychain. Some examples of this is the Keyblade of People's Hearts, the Keyblade created by gathering seven hearts of pure light, and Soul Eater. The Keyblades Ends of the Earth, Wayward Wind and Stormfall did not posses Keychains in the Kingdom Hearts II secret video Birth by sleep, as they were not designed yet. The broken Keyblades from the Keyblade Graveyard do not possess Keychains either. The actual reason for the lack of a Keychain is unknown.