Instructions
Go to the Game Corner building to the right of the lake in Celadon City, in the center of the Kanto region, and battle the Team Rocket Grunt inside. He has a Raticate and a Zubat, both at Level 20.
Go up to the poster the Rocket Grunt was standing in front of and press the "A" button to open the door to Team Rocket's secret hideout. There are more Grunts inside, all with Pokemon around Level 20, including Raticate, Grimer, Zubat, Koffing, Machop and Drowzee.
Battle your way through the Grunts in the hideout until you reach Giovanni, the boss of Team Rocket. He has a Level 24 Rhyhorn and a Level 25 Onix, both of which are weak against Grass- and Water-type attacks, and a Level 29 Persian that you can beat using Fighting-type moves. Defeat Giovanni to get the Silph Scope item.
Head to the Pokemon Tower in Lavender Town in the east of Kanto. The Silph Scope will allow you to see the Ghost-type Pokemon inside, Gastly and Haunter, both of which are weak against Normal- and Psychic-type attacks.
Climb up the stairs through the tower, battling the Channeler trainers as you go. Each has a Gastly and their leader has a Haunter. Climb to the top of the tower to face the Team Rocket duo, Jessie and James. They have three Level 27 Pokemon, Meowth, Arbok and Weezing, which you can beat with Fighting-, Ground- and Psychic-type attacks respectively.
Speak to Mr. Fuji after defeating Jessie and James and he will take you back to his house in Lavender Town to get the Pokeflute, which will be added to the key items pocket of your bag.