When you put a pot on the stovetop, it gets hot – especially the parts of the pot that make physical contact with the heating element, be it flame or electric coil, of the stove. I’m not going to speculate about how hot your stove gets, since it depends on how your stove is powered, but that flame or coil is very hot. When heating something in a pot, the portion that comes in contact with the very hot bottom of the pan will heat up more quickly than the rest of the food. This isn’t a problem for most foods, but it is a big problem for some things, such as chocolate and delicate sauces, that burn very easily. The solution is to use a double boiler.
A double boiler consists of a bowl placed on top of a pan of simmering water. The bowl does not touch the water, but creates a seal with the bottom pan to trap the steam produced by the simmering water. The trapped steam keeps the top bowl going at just about 212F (100C), the temperature at which water turns to steam and a far lower temperature than could be achieved by putting the bowl directly on that burner. Inside the top bowl, you can melt chocolate without worrying that it will stick and burn.
You can buy a double boiler, but it’s easy to make one at home. All you need to make a double boiler is a mixing bowl (preferably glass/pyrex or metal) and a saucepan that the bowl will fit on top of. The two should fit tightly together; you don’t want a gap between the bowl and the saucepan, nor do you want a bowl that sits precariously on a tiny saucepan. To use the double boiler, add water to the pan and bring it to a simmer, then place the bowl on top and fill it with whatever you intend to cook or melt.