A d4, or four-sided die, is a die that has an equal chance of rolling the integers from 1 to 4. Its most common form is a regular tetrahedron, in which form it appears in the standard 7-dice set used in role-playing games like Dungeons & Dragons. The tetrahedral d4s are sometimes known as caltrops, a reference both to their shape and how much they hurt if accidentally stepped upon.
Most d4s are regular tetrahedra (triangle-based pyramid), a Platonic solid with four sides that are equilateral triangles. Because of its shape, the d4 doesn't have a side that faces upward when it is at rest on the table, so it must be read in a different way. Each face has three numbers, arranged such that the upright number, placed either near the highest vertex or near the opposite edge (resting on the table), is the same on all three visible faces. The upright numbers represent the value of the roll.
Tetrahedral d4s do not roll especially well, and are used relatively infrequently compared to other dice.
Other forms of d4 exist. In particular, 8-sided and 12-sided dice (usually used for d8s and d12s) may have the numbers 1 to 4 printed on the sides multiple times (twice on the 8-sided dice, three times on the 12-sided dice). These roll better than the standard d4, especially thr 12-sided version.
Four-sided long dice (i.e. elongated cuboids) exist, but are rarely used since they roll even worse than the tetrahedral versions.
The d4 is the smallest standard die. It is rarely used on its own in a game rule, and therefore is used mostly to provide an adjustment with a small swing to larger numbers (including ones generated by larger die sizes). In Dungeons & Dragons, it is used for low-damage attacks, such as with daggers or the magic missile spell, and small benefits from spells such as guidance or bless. In many editions of Dungeons & Dragons prior to fourth edition, the wizard class has d4 hit dice (rolling 1d4 at each level for hit points).