Fasteners (nails and screws) and hardware (hinges, handles, locks) vary by material, size, and purpose. Using the wrong type causes poor performance, damage to surfaces, or safety issues. Different wall materials require different anchoring methods.
Examine hardware installed in your home. Learn to distinguish drywall anchors, toggle bolts, and wood screws. Practice installing a simple shelf or towel bar. Compare the quality and longevity of cheap versus expensive cabinet hinges.
A fastener's job is to hold two things together, but *how* it holds them together — and *what* it is holding them into — determines whether you should grab a nail, a screw, or a specialized anchor. The most useful mental model is to think about the type of load and the material receiving it. Once you understand those two variables, fastener selection becomes logical rather than trial and error.
Nails resist shear force (load pulling sideways across the fastener) but pull out relatively easily when the load is directly pulling away. They are fast to drive and are the right choice for structural framing, where the loads are primarily shear — the weight of a floor pushing down perpendicular to the nail holding two boards together. Screws resist withdrawal force (pulling directly out) far better than nails because their threads mechanically grip the surrounding material. A screw in a cabinet hinge, subject to the repeated pulling force of opening and closing, will stay put far longer than a nail. The rule of thumb: nails for framing, screws for everything you want to be able to remove or that will be pulled on.
The material you are fastening into matters just as much as the fastener type. Wood studs (the 2x4 framing behind drywall) are the gold standard — screw or nail directly into a stud and the connection is very strong. The problem is that studs are spaced 16 inches apart, and what you want to hang is often not conveniently located in front of one. When you must fasten into drywall alone, you need an anchor: the drywall is brittle and will crumble under load without one. Plastic expansion anchors (the small ribbed plugs) work for light loads under about 10 pounds — a picture frame, a small hook. Toggle bolts (with a spring-loaded wing that opens behind the drywall) handle much heavier loads, up to 50 pounds or more, because the wing spreads the load across a wide area of drywall. For a TV mount, floating shelf, or towel bar that will see real force, find the stud or use proper toggles — small plastic anchors will eventually rip out.
Corrosion resistance is the third selection criterion, and the most commonly ignored. The zinc coating on galvanized screws and the material of stainless steel fasteners exist for a reason: moisture causes regular steel fasteners to rust, which stains the surrounding material and eventually causes them to fail. Any fastener used outdoors, near water (deck, fence, bathroom tile), or in pressure-treated lumber (which contains preservatives that corrode standard steel) should be rated for exterior or corrosive environments. The small cost premium of stainless or hot-dipped galvanized fasteners is trivial compared to refinishing stained wood or re-hanging a piece of hardware that failed because its fastener rusted through.