A key signature consists of the modified notes in a key, i.e. sharps or flats (or none if the key is C) next to the clef that modifies all pitches in sheet music. Key signatures are convenient for notating scale degrees in various keys–without it, composing for the key of C# would be a nightmare.