I have seen this image on many pieces of sheet music and always wanted to know what it meant.
It is called a Key Signatures. It contains the flats or sharps you see after the clef and before the time signature. The purpose of the key signature, aside from telling you what key to play in, is to avoid writing too many accidentals. For example, instead of writing Bb over and over again, the flat sign (b) is placed on the third line of the Treble Clef indicating that B's need to be flatted. The sharps or flats placed on the line or space in the key signature indicates that notes on that line or space needs to be sharped or flatted. It also indicates that all the other notes of the same letter, even if they are in other octaves, needs to be sharped or flatted. Sometimes composers change the key signature throughout a piece of music.
- Major Key - If the key signature has sharps, look at the position of the last sharp and raise it by a half-step to get the key. For example, if the last sharp is E, raise it a half step which is F, the key is F sharp major. When the key signature has flats, simply look at the second to the last flat and you get the key. So for example A flat is the second to the last flat sign in the key signature, this means the music is in A flat major. The exception to this rule is F major because it only has one flat and C major because it has no flats or sharps
- Minor Key - Simply find the name of the key in major and lower it three half steps to get the minor key. For example E flat major lowered three half steps will be C minor. A minor key that has the same key signature as a major key is called a relative minor. For example E flat major and C minor both have 3 flats but C minor is three half steps lower than E flat major.
- Keep in mind that there are only seven flats: B-E-A-D-G-C-F, and it is always in the same order in a key signature. On the other hand, the order of sharps (F-C-G-D-A-E-B) is the order of flats (B-E-A-D-G-C-F) backwards