In the Cerulean City Gym in Kanto. Once you manage to get to Cerulean City, use a Pokemon that knows Cut to get to the Route that leads to Dark Cave. But instead of going to the Cave, use a Pokemon that knows Surf to get across the water and to the Power Plant. Go inside and talk to the man that manages the generator. You must do this or the next step won't work. Now, go back to Cerulean City (you can Fly if you want) and go inside the Gym. You should see a Rocket Grunt. He will go the the "Nugget Bridge" (named so for its Nugget prize in R/B/Y) at this point. Battle him, and he will give you a hint to finding the generator (or if you don't want to go looking around, it's here: the upper-left corner of the square water in the center of the Gym).
you buy it .
he's on the gold bridge. if not then check the gym
You find it in M.T Silver Cave
At the Power Plant.
The powerplant one? Well. go to Mystys gym top mid-left of the Gym you will find Machine part, bring it back to the plant and your good!
he gives you the missing machine part for the generator at the power plant :) hope i helped :D
South of Rock Cave.
You talk to the boss and he will say that somebody stole a part from the generator, when you return the part, he will give you the TM Zap Cannon. You can also now take the train from Saffron to Goldenrod.
you go to the cerulean gym by the floaties on the left after take it back to power plant
go to pallet town, i think
you can;t because she will never be there until you get the part to the power plant
after beating the gym leader misty, go down the stairs of the gym, go left and press A on the rubber rings, this is where the machine part is for the power plant.