What is the Locrian mode?
Locrian is Phrygian with its 5th lowered. Without a perfect 5th, its home chord is diminished, so it never quite settles. It is used for tension, over half-diminished chords, and in metal.
D Locrian uses the same notes as E♭ major, played with D as home.
D Locrian vs D Phrygian
One note apart. Play both and listen to the 5th.
How to hear it
Play D and then A♭, the ♭5. That tritone is why Locrian sounds like it is about to fall over.
Chords in D Locrian
These are the seven triads in D Locrian. The home chord, D°, is diminished.
Questions
What chords does D Locrian work over?
Dm7♭5 (half-diminished), especially as the ii chord in a minor ii–V.
Is Locrian ever used as a key?
Rarely as a whole song, but often for a bar at a time over a half-diminished chord.
Which position should I learn first?
Start with the position that begins on the root: D at fret 10 on the low E string. Then learn the positions either side of it, and join them up one at a time.