The origin of the term jam in this context can be traced back to the 1920s. According to the Online Dictionary of Etymology, the term originally appeared ca. 1929, referring to a "short, free improvised passage performed by the whole band". The derivation of this usage is obscure, but like other novel terms that came into English through jazz music -- such as the terms "hip", "hep" and "hepcat"—it is possible that it ultimately derives from the West African Wolof language.
The word 'jam' can be more loosely used to refer to any particularly inspired or improvisational part of a musical performance, especially in rock and jazz music. Jam sessions, however, are generally for the benefit of the performers and not part of a public performance.
Jam sessions are often used to develop new material, find suitable arrangements, or 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 sophisticated improvised recording sessions intended to be edited and released to the public.
The New York jazz scene during and after 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 an early 1950s. The Minton's jams 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), Charlie Parker, and Dizzy Gillespie. The Minton's jams were legendary for their highly competitive "cutting contests", in which soloists would try to keep up with the house band and outdo each other in improvisation skill.
As the instrumental proficiency of pop and rock musicians improved in the Sixties and early Seventies, jamming also became a regular feature of rock music; bands such as Cream, The Jimi Hendrix Experience, The Grateful Dead and the Allman Brothers Band would feature live pieces easily over fifteen minutes in length. A notable recorded example of this can be found on the 25th anniversary edition of the album Layla and Other Assorted Love Songs by Eric Clapton's early 70s band, Derek & The Dominos. The bonus CD that accompanies the 25th anniversary edition includes a number of long improvised jams between the members of the group and other musicians. This include an historic studio jam session recording between the Dominos and members of The Allman Brothers Band following the first meeting between the two groups earlier that day. As a result of this jam, guitarist Duane Allman was invited to join the Dominos after only three songs had been recorded, and he made a major contribution to the resulting LP which significantly enhanced the final product.
Another notable recorded jam in the rock idiom is the extended track "Apple Jam", which appears on All Things Must Pass, the 1970 solo album by George Harrison, and which features most of the session musicians who contributed to the LP.