I assume you're talking about threaded holes into thin sheet metal or plates.
From the factory they'll use one (or more) of a number of methods.
- Plastic threaded inserts that snap into punched square holes
- Drilled/punched hole with a clip nut (a little metal spring clip with a nut on one side)
- Weld nuts on the back side (special nut literally welded to the sheet metal)
- Rivnut/Rivet nut (A hollow rivet that's threaded on the inside, inserted into a pre-drilled/punched hole)
- Punched, then formed/threaded holes (Hole is punched through, and then a die and mandrel further shape the hole for threading)
- Thermal/flow drilling (A special die or screw is spun at high speed/pressure, melting the metal and forming a deep hole that can be threaded)
I'd say in my experience most interior components are fastened using the first method (plastic threaded inserts), while things under hood tend to use a mixture of clip-nuts and weld-nuts. The American stuff I've worked on seem to really like clip-nuts, while the Japanese cars I've worked on seem to prefer weld-nuts.