The term "key" describes the central note around which a piece of music is based. E.g., a piece of music in the key of C would derive its notes and chords from a C major scale. A piece of music in the key of A would derive its notes and chords from the A major scale, and so on. After you have learned a scale or mode in one key, it is a good idea to practice playing in every key. E and A are fairly common keys for guitar, but if you are playing with a singer, you would have to play in whatever key suits their particular voice. That could be F# or Db for example. Piano players tend to like the keys of C, F and G, and horn players like flat keys such as F, Bb and Eb. So you can see there are good reasons for learning to play equally well in every key.
A good way to learn to play in all keys is to use the key cycle (also called the cycle of 5ths or cycle of 4ths). It contains the names of all the keys and is fairly easy to memorize.
Think of the key cycle like a clock. Just as there are 12 points on the clock, there are also 12 keys. C is at the top and it contains no sharps or flats. Moving around clockwise you will find the next key is G, which contains one sharp (F#). The next key is D, which contains two sharps (F# and C#). Progressing further through the sharp keys each key contains and extra sharp, with the new sharp being the 7th note of the now key, the other sharps being any which were contained in the previous key. Therefore the key of A would automatically contain F# and C# which were in the key of D, plus G# which is the 7th note of the A major scale. As you progress around the cycle, each key introduces a new sharp. When you get to F# (at 6 o'clock), the new sharp is called E# which is enharmonically the same as F. Enharmonic means two different ways of writing the same note. Another example of enharmonic spelling would be F# and Gb. This means that Gb could become the name of the key of F# contains six sharps, while the key of Gb contains six flats.
If you start at C again at the top of the cycle and go anti-clockwise you will progress through the flat keys. The key of F contains one flat (Bb) , which then becomes the name of the next key around the cycle. In flat keys, the new flat is always, the new flat is always the 4th degree of the new key. Continuing around the cycle, the key of Bb contains two flats (Bb and Eb) and so on.