Generally made of metal and containing multiple pieces, these are used to break up marijuana by threshing it between teeth attached to the top and bottom as opposed to your hands, preventing all of the sticky-icky from ending up on your fingers. High-end grinders contain a screen that allows kief to pass through, allowing you to collect it .
An herb grinder (or simply, a grinder) is a cylindrical device with two halves (top and bottom) that separate and have sharp teeth or pegs aligned in such a way that when both halves are turned, material inside is shredded. Though ostensibly intended for use with herbs and spices for cooking, they're more commonly used to shred marijuana, resulting in a product that can be more easily hand-rolled into a "joint" that burns more evenly. Herb grinders are typically made of either metal or plastic and come in a variety of colors and polished metals.
Some grinders have two or three compartments instead of just one, with fine screens separating the bottom compartments from the ones above, thus allowing the marijuana trichomes, also called kief, to be collected separately.