A squeaky floorboard is caused by wood rubbing against wood or nails as the floor flexes underfoot. The permanent fix is securing the board to the joist below it.
Walk slowly over the area and press down to find exactly which board squeaks. Tap along the floor with your knuckle — a solid thud means joist, a hollow sound means between joists. You need to drive the screw into the joist.
Drill a small pilot hole through the floorboard into the joist to prevent splitting. Drive a wood screw through the pilot hole into the joist. Countersink it slightly below the surface of the floor.
Press wood putty into the screw hole with your finger and smooth it flush with the floor surface. Let dry and sand lightly if needed. Walk over the repaired board — the squeak should be completely gone.