The notes of D are D, F# and A. D is the root, F# the major third and A the fifth. Said aloud, its notes are D, F sharp and A.
String by string, low to high, it plays D, A, D and F#. The root, D, shows up twice in the main shape. It runs from D on string 4 up to F# on string 1.
In D, only one string rings open, string 4, which gives D. Strings 6 and 5 stay silent. Your hand covers two frets, from 2 to 3. This page has three positions. The others start at frets 5 and 10.
Change only string 1 in D and you have Dm. D and Bm have D and F# in common. Bm shares two positions with this shape.
D belongs to seven keys. In D major it is the I, in G major the V and in A major the IV. The rest appear in the key list. Further down there are two songs that use it.