To set stable crystals for shine and snap.
Cocoa butter, the fat in chocolate, can crystallize in six different forms. Only one, called Form V, gives chocolate the qualities people love: a glossy surface, a clean snap when broken, and a smooth melt in the mouth but not in the hand. If melted chocolate cools without control, it sets in a mix of unstable crystals and turns dull, streaky, soft and crumbly.
Tempering means guiding the chocolate into Form V. The classic method is to melt it fully, cool it while stirring so stable crystals start forming, then rewarm it slightly to melt any unstable ones. For dark chocolate, that's roughly melting to 115 to 120°F (45 to 50°C), cooling to about 81°F (27°C), then rewarming to around 88 to 90°F (31 to 32°C). Milk and white chocolate need slightly lower temperatures.
The easier "seed" method melts part of the chocolate and stirs in chopped tempered chocolate to cool it and seed the right crystals.
Chocolate you buy as a bar is already tempered.