A clef (from French: "key") is a musical symbol used to indicate the pitch of written notes. Placed on one of the lines at the beginning of the stave, it indicates the name and pitch of the notes on that line. This line serves as a reference point by which the names of the notes on any other line or space of the stave may be determined. Only one clef that references a note in a space rather than on a line has ever been used.
There are three types of clef used in modern music notation: F, C, and G. Each type of clef assigns a different reference note to the line (and in rare cases, the space) on which it is placed. (G and F clefs are placed as treble and bass clefs, respectively, in the vast majority of modern music.)
Once one of these clefs has been placed on one of the lines of the stave, the other lines and spaces can be read in relation to it.
The use of three different clefs makes it possible to write music for all instruments and voices, even though they may have very different tessituras (that is, even though some sound much higher or lower than others). This would be difficult to do with only one clef, since the modern stave has only five lines, and the number of pitches that can be represented on the stave, even with ledger lines, is not nearly equal to the number of notes the orchestra can produce. The use of different clefs for various instruments and voices allows each part to be written comfortably on the stave with a minimum of ledger lines. To this end, the G-clef is used for high parts, the C-clef for middle parts, and the F-clef for low parts—with the notable exception of transposing parts, which are written at a pitch different from their sound, often even in a different octave.
To facilitate writing for different tessituras, any of the clefs may theoretically be placed on any of the lines of the stave. The further down on the stave a clef is placed, the higher the tessitura it is for; conversely, the higher up the clef, the lower the tessitura.
Since there are five lines on the stave, and three clefs, it might seem that there would be fifteen possible clefs. Six of these, however, are redundant clefs (for example, a G-clef on the third line would be the same as a C-clef on the first line). That leaves nine possible distinct clefs, all of which have been used historically: the G-clef on the two bottom lines, the F-clef on the three top lines, and the C-clef on any line of the stave except the topmost, earning the name of "movable C-clef". (The C-clef on the topmost line is redundant because it is equivalent to the F-clef on the third line; both options have been used.)