Squeaks are a common problem in most floors are a simple if you can get down to the sub-floor and put screws in. However, this is not an option where hardwood floors are currently installed. Most contractors will try to fix them by installing shims between the floor joists and sub-floor from underneath. This is not a permanent fix and if the basement is finished, not an option at all. Nails are not a good option. They are often not long enough to do any good, and they quickly come loose causing the squeak to return.
A much better option is to drill and plug. This process means locating a floor joist somehow from up above, drilling a hole in your hardwood, putting a screw in the hole through the sub-floor and into the joist, and finally plugging the hole with hardwood. You will need to do this at the same time you are refinishing your hardwood floors so the plugs can be sanded even with the floor and finished to match. This results in a permanent fix for your squeaks. Plugs are also very hard to detect. Here are some pictures showing some plugs in a floor that we did recently. From a standing position, the plugs are very hard to see, but become apparent the closer you get.
The drill and plug method is a great way to get rid of an irritating problem.