A stud is essentially just a piece of threaded bar. This often resembles a machine screw without a head, although some studs to have heads that get permanently incorporated into the part they are attached to. Studs are often designed to be permanently attached to one part, proving a means of attaching another part in conjunction with a nut. This type of stud may be welded, swaged or bonded to attach it and may, therefore, have a small head to enable this.
Other studs may have threads at both ends. In some cases, these are both intended to accept nuts — such a stud is called a stud bolt. Alternatively, a stud may have a self-taping thread at one end, intended to be permanently screwed into a part, and a machine thread at the other end to accept a nut.