It depends on the subfloor material. If it's concrete, you should start with using glue and then nail down the hardwood. Otherwise, with a wooden subfloor, you can choose to go and nail down the wood without gluing.