From Bulbapedia, the community-driven Pokémon encyclopedia.
A link cable is one of several cables that are used to physically link two or more Game Boys, Game Boy Colors, or Game Boy Advances together so that they may exchange data. They can also be used to connect a Game Boy and another device, such as the Game Boy Camera or Game Boy Printer.
In Pokémon games, the link cables are used to allow players to battle and trade.
In Red, Blue, Yellow, Gold, Silver, and Crystal, only two players can link together. But with Ruby, Sapphire and Emerald, and FireRed and LeafGreen, up to four Game Boy Advances can be linked together. The reason is because the Advance generation is designed to support four player matches.
There are several types of link cables, depending upon the model of Game Boy used. For instance, the original Game Boy's link cable had much larger ends than that of the Game Boy Color link cable. Also, a GBC cable is not compatible with a GBA cable. And the Gameboy Micro uses another size cable, so there is some incompatibility among the different models over the years. Ideally, each player should have the same Game Boy model to prevent this. Please note that the GBA and GBA SP use the same link cable.
The Wireless Adapter that was shipped with earlier copies of FireRed and LeafGreen is similar to a link cable, in that all players that wish to use the Wireless Adapter must have one as well.
The DS has a built-in wireless system, so no link cable is needed.Pokémon games on the DS, such as Diamond and Pearl, are using this feature for battling and trading.