From time to time I get asked how to jam on the violin. Jamming in itself is easy, however it is difficult to jam or improvise at an advanced level with complicated rhythms and pattern. Point is you can jam right away and work at getting better over time.
To be able to improvise and jam, you should first familiarize yourself with the most common keys and scales both going up and down. Identify the appropriate key while jamming. Most music consist greatly of scales and arpeggios even if all the notes are not being used. Practice finger patterns corresponding with interesting licks in as many different keys as you can. Some of the most common keys are G, D, F, C, A, E, Bb, Eb.
Also extremely beneficial to learn and master minor dorian scales.
You are jamming even if you are only playing the base note of a piece in any given key and some kind of rhythm (hopefully creative and interesting). Rhythm is just as important and interesting as note patterns. If you add one note, such as a fifth to a base note and keep the rhythm you are already doing much better. Eventually add scales or arpeggios and play them with the interesting rhythms. Chromatic scales work well too, provided you begin on and shoot for the appropriate notes. It is often a safe bet to keep the base note and fifth in mind at all times.
See my Jazz improvisation for violin video.