Your eyes light up and your hands clench as you look at the screen in your hands. What's going on? That Caterpie is a different color! It's gold! Carefully, you whittle down it's health and catch it. Won't your friends be jealous?
Shiny Pokémon have been around since the second generation of Pokémon games, which were able to take full advantage of of the Game Boy Color's slightly more powerful system specs and wider array of colors. Finding a shiny Pokémon has always been a behind-the-scenes dice roll (...a very large die). In the Generation II appearance, Pokémon would be shiny if their Speed, Defense, and Special IVs (individual values, which are the values a Pokémon is born with) are 10, and its Attack IV is 2, 3, 6, 7, 10, 11, 14 or 15. Using this system allowed for trading with Generation I, and made the Shinies actually a bit stronger than the rest. However, this was a highly rare and unlikely chance, and it's possible that the only shiny most people know about is the Red Gyarados, a special Pokémon that you must defeat to move the game along (and it was caused Team Rocket forcing magikarp to evolve. Gyarados never have a chance to change colors).
Because these values are so rare, the actual probability has been determined to be a 1/8192 chance. This value stays constant throughout the games, even if the method for determination is different. Since Generation III, the method has been to use the Trainer ID, a secret Trainer ID, and the personality values of the Pokémon (since this generation included personalites for Pokémon).
There have always been ways to change these values, but they usually involve breeding. In Generation II, it becomes a 1/64 chance if you breed a shiny. With Global Trading now a thing, though, there is an "International", or "Masuda" method, wherein if a Pokémon from another country is present for the breeding, it becomes a 1/2048, which is likelier, but still rare. In Black and White the rate was decreased to 1/1,365.3. The PokéRadar in Diamond and Pearl was also touted as a way to help catch Shiny Pokémon from the wild, since finding the same Pokémon over and over would heighten the chances of it being this way.
The shine on a Pokémon can vary greatly. While each has a set alternate color to it, not all are as dramatic as a Caterpie or Geodude (both of which turn gold). A Shiny Snorlax, for example, is merely a shade of blue, compared to the forest green that it otherwise had. A shiny Pikachu, likewise, is simply a darker yellow. The shininess stays if the Pokémon is traded or evolved. Though in Generation II the Shinies had specific stats, this is not the case any more, a Shiny Pokémon is merely a rare treat to thrill those who know about them and their rareness and confuse those who have never seen one before.
To celebrate the release of Pokemon Black and White, three more Shinies were given out via Gamestop: Raikou, Entei, and Suicune, the "Legendary Beasts". A similar event occurred with Pokemon HeartGold and SoulSilver, where a Shiny Pikachu-colored Pichu was given away.
In the DS game Pokemon + Nobunaga's Ambition, the warlord Nobunaga Oda has a shiny Rayquaza. This Pokemon was later given over Wi-Fi to Japanese players of Pokemon Black and White.