Practice going through each mode of the C Major scale from Ionian through to Locrian,all 7 of them. Write down the 8 notes from C back to C again (an octave) start on C and finish on C ,1st mode, then start on D and finish again on D,2nd mode until you reach the last (7th) mode which is B Locrian. Familiarise yourself with these scales and the unique sound of each one. After that you can start to apply them over actual songs when you understand the role each one plays in the key.