A rivet is a mechanical fastener consisting of a smooth cylindrical shaft with heads on either end. The heads are somewhat larger than the diameter of the hole into which the rivet has been inserted. Generally one head is factory formed. The other is formed by flattening out the metal after the rivet has been inserted.
"Standard" rivets resemble bolts without threads. To use them, both sides of the work must be accessible. The second head, which holds them in the predrilled hole, may be made by cold hammering the shaft, either directly or using a cupped die, if the metal is sufficiently soft. In heavy construction, rivets are often installed while red hot and softened, and then the second head is hammered, with precautions against the heat. In all cases, the first head must be restrained so hammering does not drive it out of the hole.
A "pop" or "squeeze" rivet is for light duty applications. Essentially, they have a central stem that centers them in a predrilled hole, and a mandrel (i.e., collar) that forms the actual rivet. Once inserted, riveting pliers, a specialized fastening tool, inserts jaws that squeeze the stem against the mandrel, until the stem breaks off and the remaining metal mushrooms into the inside head. Usually, the broken-off part of the head is retained in the riveting tool for disposal.