Like cotton candy, glass is an amorphous solid. Both the carnival snack and the accompanying Mexican Coke bottle begin as molten liquid, but cool so rapidly that their molecular building blocks don’t have time to settle into an orderly pattern, also known as a crystalline structure. Chemically, the result is an unusual state, somewhere between a solid and liquid. Culturally, the result is thousands of years of folklore and fantasy.

Where cotton candy is artificial and almost entirely made of sugar, the most common kind of glass is formed from sand. These so-called silicate glasses constitute the cups we drink from, and the window panes we gaze through. But there are many other types of glass, all forged in fire. Uranium glass, which gets its viridescent tint from an oxidized form of uranium, was popular in late 19th and early 20th century home goods. Trinitite comes from the one-time detonation of a plutonium nuclear bomb at the Trinity test site in New Mexico in 1945; it melted local quartz and feldspar on impact, imparting a faint sea green hue. And Gorilla Glass, which chemists bathe in molten salts to forcibly strengthen its chemical structure, can withstand 15 drops, making it perfect for a cellphone surface.

But perhaps the most enigmatic of the glasses is obsidian, a naturally-occurring volcanic glass—and the inspiration for the all-powerful dragonglass in Game of Thrones.

Obsidian forms as lava, spewed from a volcano, and quickly cooled at surface temperatures. It’s found all over the planet, from Yellowstone National Park’s Obsidian Cliff to Italy’s Aeolian Islands, typically in sizable, concentrated deposits. Unpolished, the igneous rock can look dusty gray or brown. But polished, it becomes pitch black and shiny—sometimes so shiny, you can sometimes see your own reflection.

Obsidian dragonglass Game of Thrones
Obsidian from Yellowstone. Brantley, S. R. via USGS

For thousands of years, humans have been turning the midnight glass into weaponry. Its lattice-free insides may be unpredictable, but obsidian breaks in a very reliable “conchoidal fracture” pattern. This sharp, curved fragmentation makes it popular for arrowheads, which get their bite not just from the central point, but the small, teeth-like ridges along the blade. (Game of Thrones seems to consider dragonglass best suited for arrowheads, too.) This defensive application, along with obsidian’s everyday use as a cutting tool, made the volcanic glass highly sought-after. Earlier this year, a paper proposed the existence of an ancient Ice Road, along which humans traded obsidian into the Arctic.

RELATED: The winning images from the Smithsonian Photo Contest celebrate the beauty of our natural world

There were other uses of obsidian, too. Mesoamericans made a unique weapon called the “macuahuitl.” A wooden paddle studded with obsidian blades, it looked like an elongated mace, and surely inspired as much terror. Artisans have used it to make jet black jewelry for at least 10,000 years. And humans have assigned the stone various magical, spiritual, and healing properties throughout history. Apache tears, for example, is a name for rounded obsidian pebbles that are said to have formed from the tears of Native American women mourning Apache warriors killed by the U.S. Calvary. Today, those little rocks are used as meditation stones. Thin volcanic glass fibers called Pele’s hair, meanwhile, are named for the volcanic goddess who created the Hawaiian Islands. It’s too fragile and sharp to be handled, but remains a potent reminder of the origins of the Polynesian archipelago.

In Game of Thrones, dragonglass isn’t formed from the searing heat of a volcano, but, as its name suggests, from the fire sprayed from a dragon’s belly. As the series comes to an end after eight long seasons, there’s a lot of pressure on the shimmery substance to perform: Dragonglass, along with Valyrian steel, is the only material known to kill white walkers, the menacing undead enemy. Hopefully this amorphous solid—and the stories carved from it—can hold up.