As a rule of thumb, nails should enter the second member by twice the thickness of the material you are nailing through. Example: attaching 2 pieces for 2.54cm (1 inch) hard wood together, the nail should be 5.08cm (2 inches) long. Nails come in many different types, there are CC (concrete coated), bright (these have no coating), galvanized (exactly as the name implies), sinkers, screw, and that's about it. The nail used in a project needs to be the right type i.e.; if they are to be painted over the CC will tend to bleed through so brights should be used. If the entire project is to be of treated wood, as in a deck, then screw type galv. would be a proper nail. Headless or finish nails are for inside jobs and are designed to be set (driven below surface), and the hole filled and painted over. Nails are a metal pin used with forced to drive into a material.