A jam session is where a group of musicians improvise together (i.e. "jamming") for practice, performance, and/or social purposes. With a sufficiently skilful group, there may be no prior agreement of structure or arrangement. However, it is also common to base the improvisation (to a certain extent) on an existing song or chord progression.
Musicians will often take it in turns to play a solo, while others provide background accompaniment. A session will sometimes have a leader or coordinator who indicates who is to play a solo at what time.
Jamming is not necessarily limited to a specific style or genre of music, although it is most common in styles such as jazz, blues, and rock.