The Ditto Glitch involves trading a shiny Pokemon (such as Gyarados) from G/S/C to a R/B/Y game and teaching it Mimic. If you send the Pokemon out into a battle with a Ditto, have the Pokemon Mimic Transform, then transform into Ditto a few times while it transforms into you. Then catch the Ditto. When the Ditto is traded to G/S/C, it has the same IV's as the Pokemon you used (meaning if the Pokemon you used was shiny, the Ditto will be shiny, and if you used a max stat Pokemon, the Ditto will have maximum stats).