A key signature is shorthand. Instead of marking every F♯ in a G-major piece, the composer writes one sharp on the F line at the start of every staff.
Each step clockwise around the Circle of Fifths adds one sharp; each step counter-clockwise adds one flat. C major and A minor have no sharps or flats — they share the same key signature because they are relative keys.
Examples
- G major / E minor: 1 sharp (F♯)
- F major / D minor: 1 flat (B♭)