Sun / Moon / Ultra Sun / Ultra Moon: You get it through The Story
X / Y: You get it through the story
ORAS: you get it through the story
B / W / B2 / W2: Get it in Castelia City
D / P / Plt: Talk to Rowan's Assistance In Eterna City
G / S / C / HG / SS: Catch or Beat the lake of rage Shiny Gyarados and Get the red scale. Then go to Route 30 And speak with the Mr. Pokemon.
Ruby / Sapphire / Emerald: Get it from Mr. Stone after you deliver the letter to steven in Rustburo City
Red / Blue / Green / Yellow / Fire red / Leaf Green: Get 50 Pokemons in the pokedex and speak to Oak in the Watch Tower in Fushia City.