im working on learning basic theory, chord construction, all that stuff. I cant seem to find anything in my book about finding the key of a peice, playing in key, etc. will someone please explain the whole "key" thing to me? please make it as easy to understand as possible. Thanks alot.
If you want to jam in/around Mooresville NC message me.
A key is basically the collection of sharps/flats (#/b) you see at the left side of a sheet music paper. It can vary from 7 # to nothing to 7 b signs. Those sharps/usually in many cases show what major/minor the piece is in (nothing = C major/a minor, 1# = G/e, etc.), though there are exceptions where they denote a mode or some other more "exotic" scale (e.g. E lydian would be 5#).

Using that information, you can find the key of the piece by looking at the number of #/b there are at the left side of the paper. And playing in key would mean playing in the scale that has the bunch of notes denoted by the key signature (the #/b thing). So in the case of D major for example you would be playing with the notes of D E F# G A B C# (D major has 2#). Of course there are a lot of exceptions where other notes that "don't fit the key" are used.

Hope this helps, here's also an external link to a minilesson about keys:
the accidentals (# and b) of the key are determined by those of the scale

eg F major = F G A Bb C D E

which occurs with the intervals T T S T T T S