When music is referred to as being in a particular key, it means that the melody is based upon notes from a particular scale, e.g., in the key of C, the C major scale notes (i.e., C, D, E, F, G, A and B) will occur much more frequently than notes that do not belong to the C major scale (i.e., sharpened and flattened notes).
You will notice that in the key of G, the note F# occurs more often than F@. Instead of writing a sharp sign in front of every F note on the staff, it is easier to place one sharp sign after each clef, which indicates that all F notes are to be played as F#. This is called a key signature. The key signature for the key of G major is:
Written next is a summary of all major scales and key signatures.