Talk to Professor Oak in his laboratory after obtaining all 16 Gym Badges, and he'll give it to you.