Our floor used to squeak very badly in several spots. Fixing a squeaky floor can be a challenge.
Floors squeak for a variety of reasons. The most common is the nails that hold the sub-floor down coming loose from the joist and squeaking.
Fixing them means getting under the house, unless we're talking about a floor that isn't a ground floor, or getting under the house isn't an option. If that's the case, good luck.
The kit that's sold in stores that uses break away screws through the carpet did not work for me. It made the problem worse in our situation.
In our case, those screws you see in the picture were not put in by me, and they missed the joist. There were also nails that missed the joist in other areas, and these were actually causing some of the squeaks. In order to fix it, I bent the nails.
In the photo above, I bent the screws, but had to use shims wedged between the sub-floor and the joist. There was one that I could not fix it because it seems like a problem with the entire run, and may have to do so when I replace the carpet.