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 guitar 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 the 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:
Luthiers of both styles frequently cite better sound, longer sustain and strings staying in tune longer as advantages of each style. Fragile construction is cited as a disadvantage of each style too: single-piece necks are more likely to break on occasional hit and are harder to repair, while glued-in necks can break with time.
Apart from its main function, the headstock is an important decorative detail of a guitar. It is the place where overwhelming majority of guitar manufacturers draw their logo. Some guitars without machine heads (for example, ones equipped with Floyd Rose SpeedLoader) have a headstock for purely decorative reasons.
Signature headstock outlines.
Most major guitar brands have signature headstock designs that make their guitars or guitar series easily recognizable. As seen in a section below, even "copied" at the first glance designs retain clear visible changes in dimensions, proportions of elements, etc., so it is almost always possible to tell a major brand of a guitar by looking at headstock.
Matching headstock.
On some electric guitars and basses the finish used on the body is also applied to the face of the headstock. Generally, matched-headstock models carry a price premium over their plain counterparts due to the extra processes involved in the finishing process.
Although Fender no longer offers matched headstocks on production models made in the United States or Mexico, certain models from Fender Japan are available with matched headstocks.
The definition of a "matched headstock" varies between manufacturers and players - for example, the headstocks of Gibson guitars are nearly always black, and it is debatable whether a black-bodied Gibson has a matching headstock. Generally, a guitar is only considered to have a matching headstock if the guitar is usually produced without matching body and headstock finishes.