Stairs squeak when something is loose and the wood rubs either against another piece of wood or rubs on a nail.
You can often feel the movement by putting your finger on the stair joints while someone walks on it. (Be careful not to pinch your finger.)
If the movement is where the tread and the riser meet, you may be able to simply put a steel bracket below to lock it all together. Squeeze glue into the crack first and then force it together tight with the bracket.
If the stair tread is moving in its socket that is cut into the side stringer, then get below and sung in a glued-up shim. Regular carpenter's glue will lubricate the shim going in, and lock it from coming out. This is best done from the back. In fact, older staircases will already have shims in this location because that is how all the really good old staircases were made from the start. They may just need to be pushed in a little further. More modern staircases don't usually plan for this kind of adjustability. If you can't get at it from the back, then force in the shim from the side.