The ART of Improvising (and All That Jazz)
Music has three elements: melody (what you hum); rhythm (a waltz or swing or a tarantella, but also the duration and spacing of the melody notes); and harmony (the chords you
play on guitar).
Jazz musicians generally begin their performance of a tune by playing the melody pretty much as the composer wrote it. They might change the rhythm, both in the type of beat or relaxing the phrasing of the melody (Sinatra was a master). They might also enhance the harmony, often by adding notes to the chords specified by the composer.
Having stated the tune, the musicians are now free to improvise, which is nothing more or less than "real-time composing". Improvisation allows musicians — usually one at a time — to make up a brand new melody on-the -spot, which must fit with the existing rhythm and harmony. Creating this new melody involves a combination of playing around with the original, developing it differently than the composer; knowing all the chords in the tune and crafting in real time a new melody whose notes fit with the chords; or using a combination of melodic patterns the musician has internalized.
There are two secrets to being an exceptional improviser. The first is having in your accessible memory a massive collection of musical themes from which to draw inspiration, similar to a doctor knowing thousands of ailments and their treatments. The second is developing your ear so that you can immediately play anything and hum, without any "hunting and pecking". This is achievable, but it takes decades of dedicated listening and playing.
It is possible for an amateur jazz musician to derive satisfaction in applying the above processes to a handful of tunes and 'shedding'* them enough to internalize both the melody and the chords. Give it a try!

* 'shedding: Jazz talk for practicing, as in going out behind the shed with your axe** so as not to bother anyone!
** axe: Jazz talk for an instrument.
(originally published in Perspectives MAR/APR 2019)