The first pottery was shaped by hand and was later facilitated by invention of the potter’s weel (date unknown, between 6,500 and 3000 BCE). It was relatively easy to add a handle to a cup in the process thus producing a mug. For example, a rather advanced, decorated clay mug from 4000–5000 BCE was found in Greece.
Much of the mug design aims at thermal insulation: the thick walls of a mug, as compared to the thinner walls of teacups, insulate the beverage to prevent it from cooling or warming quickly. The mug bottom is often not flat, but either concave or has an extra rim, to reduce the thermal contact with the surface on which a mug is placed. These features often leave a characteristic circular stain on the surface. Finally, the handle of a mug keeps the hand away from the hot sides of a mug. The small cross section of the handle reduces heat flow between the liquid and the hand. For the same reason of thermal insulation, mugs are usually made of materials with low thermal conductivity, such as earthenware, bone china, porcelain, or glass.
Now we all have our favorite mug. Different shapes, colors and designs are now available. We simply can not choose one, because they are all cute.