A jam session is a relatively informal musical event, process, or activity where musicians, typically instrumentalists, play improvised solos and vamp on tunes, songs and chord progressions. To "jam" is to improvise music without extensive preparation or predefined arrangements, except for when the group is playing well-known jazz standards or covers of existing popular songs. Original jam sessions, also 'free flow sessions', are often used by musicians to develop new material (music) and find suitable arrangements. Both styles can be used simply as a social gathering and communal practice session. Jam sessions may be based upon existing songs or forms, may be loosely based on an agreed chord progression or chart suggested by one participant, or may be wholly improvisational. Jam sessions can range from very loose gatherings of amateurs to evenings where a jam session coordinator or host acts as a "gatekeeper" to ensure that only appropriate-level performers take the stage, to sophisticated improvised recording sessions by professionals which are intended to be broadcast live on radio or TV or edited and released to the public.
One source for the phrase "jam session" came about in the 1920s when white and black musicians would congregate after their regular paying gigs, to play the jazz they could not play in the "Paul Whiteman" style bands they played in. When Bing Crosby would attend these sessions, the musicians would say he was "jammin' the beat", since he would clap on the one and the three. Thus these sessions became known as "jam sessions". Mezz Mezzrow also gives this more detailed and self-referential description, based on his experience at the jazz speakeasy known as the Three Deuces:
"I think the term 'jam session' originated right in that cellar. Long before that, of course, the colored boys used to get together and play for kicks, but those were mostly private sessions, strictly for professional musicians, and the idea was usually to try to cut each other, each one trying to outdo the others and prove himself best. Those impromptu concerts of theirs were generally known as 'cuttin' contests.' Our idea...was to play together, to make the improvisation really collective....Down in that basement concert hall, somebody was always yelling over to me, 'Hey Jelly, what you gonna do?'--they gave me that nickname, or sometimes called me Roll, because I always wanted to play Clarence Williams' '[I Ain't Gonna Give Nobody None O' This] Jelly Roll'--and almost every time I'd cap them with, 'Jelly's gonna jam some now,' just as a kind of play on words. We always used the word 'session' a lot, and I think the expression 'jam session' grew up out of this playful yelling back and forth." 
The New York scene during World War II was famous for its after-hours jam sessions. One of the most famous was the regular after-hours jam at Minton's Playhouse in New York City that ran in the 1940s and early 1950s. The jam sessions at Minton's were a fertile meeting place and proving ground for both established soloists like Ben Webster and Lester Young, and the younger jazz musicians who would soon become leading exponents of the bebop movement, including Thelonious Monk (Minton's house pianist), saxophone player Charlie Parker, and trumpeter Dizzy Gillespie. The Minton's jams had competitive "cutting contests", in which soloists would try to keep up with the house band and outdo each other in improvisational skill.
Influenced by jazz, Cuban music saw the emergence of improvised jam sessions during the filin movement of the 1940s, where boleros, sones and other song types were performed in an extended form called descarga. During the 1950s these descargas became the basis of a new genre of improvised jams based on the son montuno with notable jazz influences pioneered by the likes of Julio Gutiérrez and Cachao. During the 1960s, descargas played an important role in the development of salsa, especially the salsa dura style.
As the instrumental proficiency of pop and rock musicians improved in the 1960s and early 1970s, onstage jamming—free improvisation—also became a regular feature of rock music; bands such as Pink Floyd, Cream, the Jimi Hendrix Experience, Deep Purple, The Who, the Grateful Dead, AC/DC, Led Zeppelin, Santana, King Crimson and the Allman Brothers Band would feature live improvised performances that could last anywhere between 10 and 20 minutes. However, they can be shorter on the recorded version.
Some notable recorded jams and jam-inspired performances in the rock idiom:
Though the Grateful Dead are often credited as being the first jam band, Cream incorporated long improvisations into their songs as early as 1967. However, the Grateful Dead allowed the "jam band" to become a genre unto itself; more recent bands following in their steps include Phish, moe., Umphreys Mcgee, and Widespread Panic, all of which feature extended improvisational sessions. Other bands, such as the Red Hot Chili Peppers also regularly perform live jam sessions. Progressive rock band Coheed and Cambria often end shows with a jam session to their song "The Final Cut" with different instruments.
Bluegrass music also features a tradition of jamming. Bluegrass jams happen in the parking lots and campgrounds of bluegrass festivals, in music stores, bars and restaurants and on stages. Bluegrass jams tend to be segregated by the skill level of the players. Slow jams for beginners provide an entry point. Open bluegrass jams are open to all comers, however, the players in an open jam will expect a certain level of proficiency. The abilities to hear chord progressions and keep time are prerequisite; the ability to play improvised leads that contain at least a suggestion of the melody is desired. Jams that require advanced musical proficiency are generally private, by-invitation events.
Content from Wikipedia