There are a butt load of different types of fasteners & and new ones are invented every day. This guide is just for the basic types and how/where to use them.
Nails are used primarily in fastening wood to wood, driven in with a hammer or shot using a pneumatic nail gun. Pin shaped with a sharp end and a head. They are made of a low grade of steel and their strength as a fastener comes from friction between it and the wood and from a slight bending that occurs when being driven in, and from the larger head at the top preventing pull out.
Are very small nails measured in wire gauges (16, 17, 18g) only up to 1 ¼ long. Usually used on small projects, come in both finish head and common head. Getting harder to find even at large hardware stores. Pneumatic brad nails come 18g and as long as 2.
Are used in finishing where you do not want the head to show. They have a smaller round dimpled head that can be set below the surface of the wood with a nail set. The remaining small hole is filled with a wood putty or filler to hide the nail fastener. They are designated/measured in pennies (indicated by d), starting at 2d (1) and go up to 20d (4). They get thicker as well as longer the higher the d
These are what most people visualize as a nail. Pin shaped with a sharp point and a disc-like head. Measured/designated in 'pennies' designated by (d) size just like the finish nails and all other nails in the US.
Common nails and finish nails etc can come in many different coating to increase holding power or to prevent discoloration of the wood or to resist rusting. The shanks of the nails can have different treatment to increase holding power (e.g. ring shank, ardox) or to serve special purposes (paneling nails, drywall nails).
Use. Sometimes it is wise to pilot hole (drilled hole undersized from the nail shank) for nails that will be used very near the end of wood to prevent splitting of the board. You can also blunt the sharp tip of the nail with a small hammer blow to help prevent splitting. What that does is make a blunt tip that tears and crushes the wood as it is driven in instead of splitting. Frequently used on thin cedar siding.
General rule of thumb is to use a nail 3 times the length of the thickness of the item being nailed but this isn't always possible if the piece being nailed to is not thick enough.
Couple links about nails. The Wiki link includes some history (fascinating ....really it is). The other link gives some images to put with the idea as well as describes some other types. Hey this is handy stuff to know.
You'll need music to drive nails by. Here 'tis.
Always best to drill the hole in the piece being held (pulled to or top piece) slightly oversize from the shank of the screw so that all of the pulling power of the threads is used on the piece being held/pulled to.
There are 2 basic shapes of screw heads.
HEADS THAT SIT ABOVE THE SURFACE. Pan Head, Oval Head, Round Head, Hex Head and others less common. .
FLAT HEAD. Top of the head is flat with beveled sides leading down to the shank. The idea is to use a 'counter sink' to drill a beveled top of the hole in which the flat head sits giving an overall flush appearance.
This refers to the type of configuration of the head and the type of 'bit/driver used to turn the screw. Most common are: Slotted, Phillips, Square Drive, Torx Drive, Allen, and Hex heads
Have threaded shanks to which a nut attaches to pull the two items together. The number of threads per inch can be USC (United States Coarse, USF (United States Fine, or Metric (which also has a few common pitches and thread counts. Make sure you match the thread of the nut with the thread of the screw. When used with thicker metal the hole is tapped and threaded to accept the screw. Come in sizes from #3-#14 and then 1/4" and above.
Machine screws 1/4"+ with hex heads are referred to as machine bolts.
-SHEET METAL SCREWS.
As the name implies these are used to attach sheet metals together. Holes are drilled slightly undersize and then the aggressive wide spiral 'threads' tap into and pull the metals together. The shanks are straight except for the pointed tip. They also can come with a 'self-tapping' tip which is just drilling the hole as you drive it in. You cannot use sheet metal screws on thick metals (over 1/8") because the tip is not hard enough to tap the thicker metal.
These screws are tapered. Below the head is a shoulder part of the shank that is meant to fit into the hole drilled in the top piece, then you have a tapered spiral 'thread' section, and then finally the smaller tip. The downside of wood screws is that to make a good effective hold they need their holes drilled in three different widths (special bit sometimes used or 3 different drill bits). Wood screws are not actually used much any longer. Instead most people I know used sheet metal screws or construction screws that only require drilling one hole plus the hole in the wood held (slightly oversize).
-SCREW COATINGS AND THREADS (and Materials)!!
Oh yeah, again, a whole butt load of choices; coarse thread, construction thread, drywall 'fine' thread, availability in stainless steel or common steel, availability in coatings to resist rust (zinc) or made of alloys to prevent rust used in exposed outside work, painted or plated screws and nails, blah blah blah. It can be really confusing
Rivets are a piece of softer metal rod that the ends are peened over to create a head and hold the pieces together. Holes are usually just the size of the rod or slightly larger. Rivets come most frequently with one end pre-peened (rolled over) and then you manually peen the other end. There are also 'pop-rivets which use a tool to pull a shank attached to the interior of the rivet to create pinned ends. As the shank is pulled back both ends enlarge. Not as decorative looking as regular rivets, but much easier to use.