Dungeons and Dragons uses any standard 7-dice set. In fact, the 7-dice set is the Tabletop RPG standard because of D&D. At a minimum to play you'll need one each of: 4-sided dice, 6-sided dice, 8-sided dice, two 10-sided dice, 12-sided dice, and 20-sided dice. These dice collectively make up the standard DnD Dice Set.
The d4, the dice that resembles a pyramid, is used in several spells found in Dungeons and Dragons. It is also used as the hit die when your character is wielding smaller weapons like clubs and daggers. As an example, if you make an attack with a dagger and the Dungeon Master determines that your attack is a "hit," you'll then roll the d4 to determine if the damage taken by your enemy was a 1, 2, 3, or 4.
Also, be careful not to leave one of these on the floor. Stepping on a d4 will make you wish you had stepped on Legos!
The cubic d6 is what most people visualize when you say the word, "dice." It has six sides, numbered 1 through 6. The d6 can be used for melee attack rolls, depending on the weapon your character is wielding. It is also used during the character creation process to determine your characters attributes. Some spells may require you to roll multiple d6s. For example, the Feeblemind spell deals 4d6 psychic damage to a target. As another example, the Maul melee weapon deals 2d6 bludgeoning damage. If you only have one d6, you'll need to roll the dice multiple times. Alternatively, you can obtain extra d6s for just such occasions.
Probably the least-used dice in Dungeons and Dragons, the d12 is used to determine damage in a limited number of weapons, usually large "great" weapons utilized by Barbarians.
It also comes in handy in a few specific circumstances dealing with time of day or time of year.
You'll always want to keep this dice close at hand when playing D&D because you'll use it more than any other piece in the 7-dice set. When attacking with a melee weapon or spell, the dungeon master will let you know the target number you must roll with the d20 in order to "hit" your target. Rolling too low mean you won't deal any damage at all to your opponent.
The d20 is also used in saving throws and ability checks. A high enough roll during a saving throw means your character avoids taking damage from an enemy attack. As an example, a too-low roll during a stealth check means your character's attempt at sneaking past a dozing guard will fail.
Only a single set is absolutely required, although most gamers prefer to have several sets on hand so they can roll larger dice pools without needing to re-roll any dice.
An extra d20 comes in handy when rolling advantage/disadvantage. This allows you to roll two d20s at the same time vs having to re-roll the same d20 twice. Many spells also require multiple d6s and having extra 6-sided dice is also useful when rolling up stats for a new character. In fact, manufacturers used to produce DnD dice sets with 4d6 in them; however, they fell out of favor because a standard 7-set was cheaper.
There has been an explosion in the types, colors, sizes, and shapes of Dungeons and Dragons Dice in recent years. Initially, DnD dice were simply a solid color and players had to color in the numbers themselves, usually with a crayon.
Today, there are still solid-color opaque dice as well as translucent dice. Some translucent dice even have elaborate inclusions, like the Green Conch Shell Dice.
Beyond the more traditional polymer and resin dice, there are also metal dnd dice sets, wooden dice sets, and even dice sets made from gemstones. With the advent of 3D printing, there are even elaborate three-dimensionally-printed dice sets like the Metal Thorn Set.
You should never, ever just leave your dice lying around. Not only is it the quickest way to loose all or some of them, but they are also a chocking hazard for small children. Its best to keep your polymer and acrylic dice safe in a dice bag or dice box.
When it comes to metal dice, always keep those in a padding tin–usually included with the sale of each metal dice set. For gemstone dice, you can easily store them using a small dice bag and a small microfiber cloth.
There is no reason you have to buy any of the dice sets listed above. Today, there are a bevy of YouTube videos and detailed how-tos that show you, step-by-step, how to make all types of polyhedral dice.
One of the best places to get started making dice is on YouTube. Specificially, the Rybonator YouTube Channel is one of our favorites. He has a bevy of detailed instructional videos that walk you through a number of projects. Probably his most popular video is one where he walks you through making DIY Sharp Edge Dice.
If YouTube videos aren't your thing, you can check out this blog post at Instructables.