I tried (but failed) to learn this. I can tell you what my guitar teacher taught me at the time.
First learn the C major scale (no sharps or flats), backwards and forwards.... I learned it on the bottom two strings, then on the 4th + 5th strings, then on the 3rd + 4th, then on the 2nd + 3rd, then on th 1st + 2nd, then a big pattern that went across all 6 strings, 3 notes per string, up and down then up a littel further then down, the up a little further, etc. until it traversed the whole neck, then in reverse all the way back down... Took ages to learn, and hasn't proved that useful to me, but maybe I'm just dense. Still can't play it at the warp speed my guitar teacher could do.
Next, there's an ordering to the scales, so that the next scale after C major has one more sharp, F#, so it's just the same as C major, except the F becomes an F#. (Can't remember what scale that is, see how much I learned?

) And then each scale proceeds from there, each one, adding one more sharp (then there's the scales with flats.) The idea being that when you learn the 2nd scale, you'll know damn well where all the F#'s are, and so on, with each scale you'll bang another note into your brain. Long way to go about it, and it didn't work for me... still don't know where the notes are.

Good luck.