Headstock
A headstock or peghead is part of a guitar or similar stringed instrument such as a lute, mandolin, banjo, ukulele and others of the lute lineage. The main function of a headstock is to house the pegs or mechanism that holds the strings at the "head" of the instrument. At the "tail" of the instrument the strings are usually held by a tailpiece or bridge. Machine heads on the headstock are commonly used to tune the instrument by adjusting the tension of strings and, consequentially, the pitch of sound they produce.
Construction details
Two traditional layouts of tuners are called "3+3" (3 top tuners and 3 bottom ones) and "6 in line" tuners, though many other combinations are known, especially for bass guitars and non-6-string guitars. When there are no machine heads (i.e. tuners are not needed or located in some other place, for example, on guitar body), the guitar headstock may be missing completely, as in Steinberger guitar or some Chapman stick models.
The headstock may be carved separately and glued to neck using some sort of joint (such as a scarf joint). There are two major trends in headstock construction, based on how the string will go after passing the nut. The advantages and disadvantages of both trends are very debatable and subjective, so these two variants are used: