'Scuse me butting in, but there seems to be a hint of confusion floating around here...
Modes are a way of analysing and describing the sounds of scales against different root notes or chords. They are also a system of composition that is different from keys (not contained within keys).
They are not primarily a way of improvising (on existing music). They are not fretboard patterns. (An "A Aeolian" fretboard pattern won't sound like A Aeolian if played over C or Dm, or anything but Am.)
lizardly's info is good, but the statement "If you play in the key of G [over a Bm chord] the song will sound Phrygian regardless of what scale patterns you use" - is potentially misleading, because of the ambiguity of the phrase "key of G" (he means the G major scale, that set of notes).
IOW, the statement is correct, but B phrygian mode is not "in the key of G". It uses the same notes as
the key of G major. But it's not in the key of
G any more than the key of E minor is "in the key of G".
"In the key of G" implies G is the tonic note. G is not the tonic in B phrygian mode; B is.
IOW, a mode is not in
a key; it is itself like
a key. It's something a piece of music is IN to start with.
If you have a chord sequence in G major, and you get a Bm chord, you are not suddenly in B phrygian mode. What you have is a iii chord in the key of G, not a i chord in B phrygian. The difference is subtle, but important - because it's to do with SOUND, not theory; and such tiny distinctions in language tend to build into enormous levels of confusion.
If you have a Dm chord, and you play the C major scale over it (whether you call the pattern A aeolian, B locrian, C ionian, D dorian, E phrygian, F lydian or G mixolydian), you will get a D dorian sound.
IOW, if someone was to play a D bass note, and you noodled around on the white notes of the piano. D dorian mode is the sound that would come out (you don't even have to know what notes you're playing). If the bassist changed his note to A, then your noodling would become A aeolian. IOW, you are not in control - the bassist is!
Of course, the mode would change if you started replacing one or more white notes with a black note.
E.g., if that bassist was still banging away on D, and you inserted an F# into the scale instead of F (keeping the rest of the white notes) - then you'd have D mixolydian mode. He changes to A - hey presto, A dorian mode.
If you have a standard chord sequence in a major key (let's say G-D-Em-C, a I-V-vi-IV in G major), then modes - in their true sense - are irrelevant.
OK, if you've learned all your major scale patterns as modes (patterns with mode names) then they're not exactly irrelevant! That's what your knowledge consists of! But they have no bearing on the chords. You can pick any G major pattern for any chord, it will work.
The advantage of mode patterns is if you don't know the notes. You can see the D chord and think "ah, D mixolydian mode" - assuming you know the V chord of a key takes mixolydian mode - and go straight to a pattern that has all the right notes.
of this method (and it's a big one) is that you're limited to one pattern per chord. It means you'll be in one position for one chord, then moving up or down the neck to play the right mode pattern for the next chord. Do you see pros doing that? No, you don't...
Also, you have no real idea how the notes in the pattern relate to the chord musically.
However, the better method does require a fair amount of learning.
You need to know all the possible chord shapes for every chord (at least 5 for each major, 3 for each minor).
You need to know which notes in each shape are the root, 3rd and 5th.
You need to know a fair amount of the fretboard (at least the 6th and 5th strings so you can place chords by their roots).
Ultimately, it helps to know the whole fretboard. (But you should be working towards that anyway.)
You need a working knowledge of keys - ie what chords are contained in what keys, how to identify a key from a chord sequence.
The advantage of this method is you are free from memorising patterns forever. Scales are no mystery. No need to remember modes, or any rules about applying them; only the construction formula for a major scale.
So when you see that sequence G-D-Em-C, (a) you know it means G major scale; (b) you know all the shapes you could use for each chord; (c) you know all the positions of all the notes you can use; (d) you can build notes off the chord arpeggios.
You'll be able to play a solo in ANY position on the neck, on ANY chord. (All modes and keys are available in all positions.) This makes for musical solos, rather than disjointed ones with breaks between chords.
There's no need for a scale pattern to have the chord root as its lowest note (this is the fallacy that the mode pattern system implies). That's not a bad foundation - but it's too limiting. Every scale, every mode, runs all over the neck. Every pattern has 2 or 3 roots in it (just as it has 2 or 3 of every scale note).
What matters - musically - is to know how and where to find the 1-3-5 of each chord, and then the 7-9-11-13, according to what key you're in.
This requires knowledge of the basic chord shapes, and the various modal additions to each.
OK, yes, that's using modes!
But it's using them from the basis of a chord shape/arpeggio, not from an isolated fret pattern.
E.g., you need to be able to take a D triad (any shape) and know where the b7 or maj7 would be; where the 6 and 9 would be; and where the 4 or #4 would be. Then you have all your 3 modal options (ionian, mixolydian, lydian). (The 6 and 9, btw, apply to all 3 modes, and give you the major pent of the chord root - highly useful!)
Actually, this isn't a great deal of knowledge. 5 major triad shapes (only 2 of which are very common as movable options), 3 minors (ditto, 2 common movable ones). Each one has 2 added notes to give you the universal pentatonic (for minor chords these are the 4 and b7); and 2 more notes which define which of three modes the chord could cover.
(The dim chord? Forget it...at least for rock music.)
The harder part, perhaps, is being able to identify the scales (and full modal chord types) that any chord sequence indicates.
But if you can identify a major key scale, shared by all the chords, then you know which single modal option you have for each chord. (This is if you don't yet know the neck well enough to find all the scale notes that way.)
And even if you can't, you still have the pentatonic for each, which gets you a hell of a long way - provided you have those 8 chord shape options under your belt, to save you zooming up and down the neck all the time.