It is crazy actually...
Do you know some harmony? It starts there. You might know that in major, your first chord is a Major 7 chord. Meaning that in C, you have CM7. RIght? So it means that everytime you see A XM7, you'll be able to play the X major Scale...
But if you go deeper, you see that in C, you have:
CM7 Dm7 Em7 FM7 G7 Am7 Bm7b5
So, there's another XM7, here, it's the FM7. Meaning that you can play C major over FM7, OR F major (that means you consider FM7 as the I chord in F major) F major is also the C mixolydian mode. So if you know you r basic fingerings, you won't get lost. Let's say you have a progression that goes CM7 FM7 you can either play C major, or switch from C major to C mixolydian (F major) every measure...
And as you can see, you also have 3 Xm7 chords, so each of them can be considered as the 2nd, 3rd, or 6th of a different scale...
Also, since Jazz is about tension, you also have notes that don't belong to any scale, they are called ornaments or chromatics, and they are usually used to 'fill' for rythmic values (say you have a 5 notes arpeggios, you'll use 3 chromatics to get to 8 notes, so that you can fill an entire measure with your lick)
That's a really basic view of Jazz though. Chris Mood could tell you way more, but that's a start.