When we discuss KEYS in music we must always look at one thing: the KEY signature. This is the bit on the first line, next to the clef (Treble, Bass, Alto or Soprano). You'll notice this as it will have Sharps (#) and Flats (b). We can tell the key by what sharps and flats the key signature has. We can work it using the Circle of fifths. So no flats or sharps at all is C major. We then work up in fifths to find out the next key with sharps:
1 Sharp (F#): Gmaj
2 Sharps (F# & C#): Dmaj
3 Sharps( F#, C# & G#): Amaj
etc.
1 Flat (Bb): Fmaj
2 Flats (Bb & Eb): Bb Maj
3 Flats (Bb, Eb & Ab): Eb Maj
As we can see however, these are all major keys. We must look at accidnetals in the piece and the ending notes of many phrases. If the Piece/Section revolves around and keeps coming back to a note that is not the tonic, if there are many accidentals in the piece or if the piece just sounds sad. Then we are in the minor key. To figure out the minor key... we take the major key and move down three semitones.