Originally Posted by Joe Louvar
....first you need to know your fretboard - maybe get some books, or take some lessons.
If you've only worked on songs in the past you'll need more music education to figure things out.
Check out Youtube videos of jams. There's also lots of guitar backing tracks available to practice with.
It also helps to determine what key the jam is going to be in before you start along with if it is major, minor, blues, etc.
Taking some lessons is a great idea.
Recording your jams is also helpful.