I think "jamming" is very subjective to the individual. Some people jam via making stuff up, other people jam via improvising on an existing tune. I'm sure you've all heard a thousand minute Satch jam on Purple Haze or whatever.
I think you really just need a basic understanding of how to build chords and how to play a few scales. I personally don't like to just "make stuff up" when I jam. I'll sit down and work out a few chords, based on theoretically correct progressions, then throw some licks on top.
That being said, it really is subjective. But here is something you can chew on that may or may not help.
I'd first start with your chords. You don't need to "build" them, you just need to know what you are playing. And of course what you actually play, depends on other instruments and players you are jamming with.
Take something simple, like an E minor chord:
Then think about what you can pull from that chord or what else can that chord be? i.e. what notes are missing to make this "fit"?
I don't know any good way to describe this, so I will sort of draw what my thought process might be for something like this.
D:-2 ----------------> E B E G B E
E Aeolian - E F# G A B C D
G Major Key
G Am Bm C D Em F#dim
Gmaj7 Am7 Bm7 Cmaj7 Dmaj7 F#m7b5
G Major - G A B C D E F#
Em Gmaj7 Em9 Bm Bsus4
I've just devised six chords which I can use to create some kind of chord progression. Next you have to think about scales.
This is where it really helps to know a few things. Such as
MELODIC MINOR. When you see a 7th or a maj7 or
a dim chord, you should immediately think, Melodic Minor
This is where people get confused. Jamming is NOT just playing what feels good or right, or just making stuff up. You do really need to understand a little theory to jam efficiently.
Some scales I might consider would be:
E Melodic Minor
Here is a little chart that should help you understand chords better as well as understanding "scale usage" better:
The I Chord: C E G Cmaj
1 3 5
The ii Chord: D F A Dmin
1 b3 5
The iii Chord: E G B Emin
1 b3 5
The IV Chord: F A C Fmaj
1 3 5
The V Chord: G B D Gmaj
1 3 5
The vi Chord: A C E Amin
1 b3 5
The vii Chord: B D F Bdim (remember the vii or 7th chord, is almost always dimished)
1 b3 b5
If you're looking at that chart, you can see, and first you have to be able to decipher the key, that with a vi chord, you should be able to play a minor scale.
I know that I typed this in another thread AND made a lesson on it, but here is an excerpt from the lesson:
"Right, so there is a the old saying, "If it sounds good, it is good."
That is all good and dandy if you know what sounds good. If you don't, you are just as lost. That being said, there is always more than one option when deciding on what scale to use over a chord or progression. More to the point, I've come up with a simple excersise to help a player actually learn what sounds good and what doesn't.
Grab a pen and piece of paper. Pick a chord, any chord, but just one chord. Record yourself playing that one chord over and over. Or just once or twice and loop it. Next pick five modes and, don't solo per say because you want to really hear what you are doing, play them over your one chord. Play them one after the other. Or play all the modes in every key. But play them so you can clearly hear what they sound like. Now write down, and this is why I said pick five, what each one sounds like over that chord. I.e. "good", "bad", "cool sounding", "sad sounding", whatever. Now pick two chords and repeat the process. Except this time you can experiment a little. Play the chords however you'd like. As arppeggios or whatever you want. Play the same scales over just your two chords and write down what it sounds like. This time however, pay close attention to how two chords sounds different under the same scale as one chord does. Or how a particular mode is more suited for a particar note in one of the chords.
The goal of this is to hopefully help you understand exactly what effect particular chords and scales have on each when played in conjunction with one another. Now you will no longer have to waste time guessing and checking when all you really want to do is record. You will now know what a certain scale will sound like, when played over a certain chord or even more specific, what certain intervals will sound like when played together as a harmony or when played seperate as melodies."
You can check out the whole lesson HERE
I hope you found that helpful.