Just think outside the square a little man...
Everyone has explained it fairly well, but it can be damn hard to explain concepts such as these through a keyboard.
Think of it this way:
The "jazz" 12 bar blues consists of only a handful of 'anchors'. The rest of the chords are used as transitional chords to help resolve each "anchor tone" more strongly.
The Dominant resolution(V7 to I) is the most effective, and most commonly used resolution. The use of the II minor chord is just a simple way of 'smoothening' out the transition to the the V7 chord. It also helps to keep the harmony flowing, aswell as add more harmonic ideas for the soloist.
The other commonly used resolution is the Tritone Substitute resolution(bII7 to I). Basically, it is just playing a dominant chord a semitone above the I chord, so that it chromatically leads into the I chord. So instead of the progression being:
Dmi7-G7-|Cmi7----|F7----|
it could be(tritone sub)
Dmi7-Db7-|Cmi7----|F7----|
.........You could also change all the minor chords to Dominant chords, there is literally 1000 possibilities with this progression.
Jazz is all about setting up the next tonality as smoothly as possibly. And ALOT of the time this means you have to totally change keys for sometimes no more than a beat or two.
Just try and think outside the square a little and it becomes alot clearer dude.
Sorry if i made no sense
