I was always warned by piano teachers to stick with the sheet music and don't veer off-course. I've been listening to improv jazz groups. Each time a song can be played differently, but it always sounds good. How does improv work? Who plays the melody and how does everyone in the group know? How does a member of the group (sax, drummer, bass, etc.) acquire the "spotlight" and do a solo? How does any one group member know if he should syncopate or trill or play the tune straight or whatever, since none of them play with sheet music? How do they keep the same rhythm?
Please explain to me how improv works.