Nuts are used with anchors, bolts, screws, studs, threaded rods—and on any other fastener that has machine screw threads—to fasten just about anything to anything. There are many different types of nuts that are used in a variety different applications but broadly fall into two categories: plain and locking. What we will call standard nuts are the ones frequently encountered; locking types, in contrast, have a feature that "locks" the nut thread to the mating threads to resist loosening.
By definition, "A nut is [a] block or sleeve having an internal thread designed to assemble with the external thread on a bolt, screw, or other threaded part. It may serve as a fastening means, an adjusting means, a means for transmitting motion, or a means for transmitting power with a large mechanical advantage and non-reversible motion."
Some nuts are chamfered (beveled) on one side only while others are symmetrical and chamfered on both sides (double chamfered).
The two most common types of nuts are hex (short for hexagon, which has six sides) and square (four sided) nuts. Hex nuts are more popular but square nuts have their advantages.
Common materials include steel (unplated and plated—see more about finishes below), stainless steel, brass, silicon bronze, aluminum and nylon. Steel remains the least costly material followed by stainless steel; copper alloys (such as brass and silicon bronze) are the most expensive.