Fly is one of the three HMs earned during the cutscene of Viridian city along with Strength and Surf.
HM