Play Along Videos on Youtube
If you're ready to jam, Youtube is always ready to oblige. They have thousands of high-quality jam tracks? You just have to know where the good ones are.
Playing over a solo you like is the best way to learn to emulate the style and phrasing of the soloist. (No one on Youtube will get mad because you for stepped all over their solo.)
How Do I Learn To Jam?
Maybe you play an instrument, but you don't know how to 'jam.' You never tried to create a part on the fly with other musicians, or on top of someone else's music.
The key idea is 'interacting.' Learning to jam is learning to interact. For guitar and keyboard players, that interaction is usually in the form of either a chord comp (accompaniment) or a single line lead.
If you're trying to digest the 'jamming' concept, you should learn to think of music in terms of chords and leads. Also in terms of foreground (melody or lead) and background (chord comping) and the grey areas in between. Sometimes the roles reverse, single-lines can play in the background role, and chords can play in the foreground.
In traditional settings, music is either played correctly, or else it's incorrect. In a jam setting, there's no right or wrong. There is 'works' and 'doesn't work,' and endless grey areas in between.
Learning to jam is a searching process. If you're learning to jam, search for what works, but don't be self-critical. You should put all self-criticism aside while you're learning to interact with music in a new way. At this point in your journey, self-criticism is not your friend. Don't worry - it will be there waiting for you as soon as you're ready to return to it.
Jamming involves playing by ear. If you don't know how to play by ear, don't assume that you can't. Don't worry if you're not confident about your sense of timing.
Jamming assumes that you're playing with other instruments, whether live or recorded - you experience them much the same way. That's why jamming with recorded music is great preparation for learning to jam in live settings.