It permanently anchors itself to the sheet metal by swaging the surrounding material. Generally, the swage nut is made of a hard metal such as stainless steel, while it is typically inserted into a pre-drilled hole in a softer material such as aluminum. Pressing the nut in with an arbor press or by tightening a screw through the hole causes the softer material to plastically deform or swage into an undercut in the nut. This locks the nut into the hole, while a knurled portion of the nut keeps it from rotating.
Albert Spokes filed for a U.S. patent on the swage nut in early 1958. The swage nut is descended from an older idea, the clinch nut. Clinch nuts incorporate a tubular shaft that fits through the part to be attached and is clinched or riveted in place from the opposite side. 
- Smith, Carroll (1990), Carroll Smith's Nuts, Bolts, Fasteners, and Plumbing Handbook, MotorBooks/MBI Publishing Company, ISBN 0-87938-406-9.