Instructions
Travel to Cianwood City and head west until you see the Cianwood City Gym. The gym has an image of a Poke ball above its door.
Climb up the flights of stairs until you reach the machine with cogs. Press the "A" button facing the machine and select "Yes" when asked if you would like to turn the winch. This will allow you to challenge the gym leader.
Go back down the stairs and talk to Chuck, who is standing in the middle of the gym. He will challenge you to a Pokemon battle.
Defeat him by using Pokemon with moves that are strong against fighting-type Pokemon. These include flying and psychic-type attacks such as Gust, Psychic, Razor Wing, and Psywave.
Exit the gym after defeating Chuck. A woman will automatically approach you and give you the HM Fly. Once you obtain the HM Fly, it becomes a permanent part of your inventory and cannot be discarded.