@Neil Meyer has covered what the cycle of fifths is (well, half of it), but it works the same way with the flats.
Since you just want to play/jam (and I guess at the moment you don't want to write down on a formal piece of paper anything) I suggest you do this:
Start with the C major scale (or A minor) that has only natural notes. That means the notes it contains are C D E F G A B.
Now, look at this picture:
I know it might seem confusing at the beginning, but you'll get used to it. The notes you're going to need in the C major scale are the colored ones (as well as the open strings).
Just play them again and again and again and you'll get used to them eventually (that's what I did). It might be easier to play the notes (of C major scale) on just the first 5-6 frets at first,then add one more fret,then one more and so on..
Then, when you feel comfortable enough, move on to the next scale (on the cycle of fifths), so that there aren't that many differences on the key (only one sharp or flat) and you do the same thing.
This is a good picture to help you with it. You start from the C and then move on on the right or left till you reach the last one.
Each step on the right adds a sharp (#) onto your key. That means G major scale has one sharp, D major scale has 2 sharps etc.. The cycle works the same way if you go to the left. The only difference is that you add a flat (b) onto your key.
If this picture confuses you, here are some tips: Each pizza piece contains the chord (C), then the notes that the chord contains (C E G) and then the relative minor chord (Am).
Edit: If you don't want to use the cycle for whatever reason of yours, you can just Google 'C major scale' or 'F minor scale' or whatever to find out what notes the scale you are interested in contains and then use the first image to find them on the fretboard.