Dmaj7 is made of these notes: D (root), F# (major third), A (fifth), C# (major seventh).
With this shape the strings sound like this, from the D string to the D string: D, C#, F#, D.
A major seventh chord sounds dreamy and soft. It can replace the plain major chord, especially at the start or end of a song.
Dmaj7 belongs to these major keys: D major (degree I), A major (degree IV).