The good news is that this is not confusing once you understand it.
The circle of fifths is a helpful tool that shows you all of the major (and minor) scales and their respective accidentals (sharps or flats) which make up their key signature. I suggest that you print this out or copy it down for your reference.
The reason this is called the circle of fifths is because as you travel from one key to the next, it is a perfect fifth away. Remember the scale degrees? If you are in the key of C major and you find the fifth note of the scale or a P5, it is the key of G major. Traveling clockwise on the circle of fifths, C to G is a perfect fifth. This holds true for the entire circle.
Each key will have a different key signature which is notated on the staff immediately after the treble clef. Looking at the chart, each key has its own key signature on the staff conveniently placed in the same wedge. For example:
In the key of G major, there is one sharp:
The note that has the sharp is the note of "F." Do you know why there is an F# in the key of G Major? If you think back to the formula for a major scale (whole step, whole step, half step, whole step, whole step, whole step, half step), in order to make the last half step, the note of F must be raised by making it sharp.
Why don't we call it G Flat instead of F Sharp?
We are trying to establish the key of G Major. It is the key of G Major, not G Flat Major (Gb Major). One note cannot have two names in the same key. If we made the key signature have one flat, we would never know when we should play a G natural or a G flat.
In general, key signatures offer the ability to write music without constantly writing out the sharps and flats for every note. Although this would mean more income for the printing business, it is very tedious work for a composer and very difficult to read for a musician.
You may also have noticed that there are three major scales that are enharmonic, meaning that they can have two different names the same as one note can have two different names. These scales are only allowed because they do not break the above rule of naming a note two different names within the same key. If this is confusing, please email me. A blog alone will not answer this question sufficiently.
Do your best to memorize the major keys by the key signature. A good musician is able to recognize any key by the key signature within seconds. If you make flash cards yourself, it will give you good practice drawing a treble clef, flats, and sharps.