- "The Maesters call it 'obsidian'."
- ―Samwell Tarly
Dragonglass is a common name in Westeros for the substance known as obsidian, a form of volcanic glass. Along with Valyrian steel, it is one of the two known substances capable of killing White Walkers. In Old Valyria, it was known as zīrtys perzys, which translates to "frozen fire".
Dragonglass was a very important tool to the Children of the Forest, using it to fashion weapons. A long-forgotten secret is that the Children actually created the White Walkers as a weapon, by transforming humans into them: this was achieved in a magic ceremony that involved (among other things) plunging a dragonglass shard into a human's chest.
Grenn, Edd, and Samwell Tarly find a cache of dragonglass spear heads along with an old warhorn buried in the snow on the Fist of the First Men. Sam identifies the material, but is unsure why it would have been left on the Fist by a ranger of the Night's Watch. Edd suggests that whoever it was, they wanted someone else to find the weapons.
After escaping Craster's Keep with Gilly, Sam shows her a piece of the dragonglass he had found. She asks what it does, and Sam responds that he isn't sure it does anything. He does remark how beautiful it is however. Sam later uses his dagger to slay a White Walker that was after Gilly's baby. When Sam stabs the White Walker in the shoulder, the creature turns to ice and shatters. Sam provides Bran Stark with a dragonglass dagger and Meera Reed with a set of dragonglass arrowheads for their journey beyond the wall. 
At Hardhome, Jon Snow gives Sam's dragonglass to the Free Folk he is trying to convince to come South of the Wall with him, telling them Sam's experience of killing a White Walker with dragonglass. Some of the wildlings are convinced, partly due to the dragonglass. Later, during the evacuation, the Night's Watch oversees the collection of dragonglass needed for the defense of the Wall. However when the White Walkers and the horde of wights attacked most of the dragonglass is left behind when they overrun the whole settlement. Wun-wun, a giant at Hardhome who survived the invasion may have kept a dragonglass arrowhead he was examining as the attack began.
Dragonglass is revealed to be the substance that turns men into White Walkers. The first White Walker was created when Leaf and several other Children of the Forest forced a dragonglass dagger through a First Man's heart. When the White Walkers invade the Cave of the three-eyed raven, one of the Children tries to kill a White Walker with a dragonglass spear, but the blade is blocked by his chest armor and he kills her. Meera Reed then kills him by throwing another dragonglass spear into his unprotected neck. 
After a hooded man on a horse came to rescue Bran and Meera from the Wights, he revealed himself to be the Benjen Stark who went missing during his last Ranging. He recounted that when he was stabbed by a White Walker and left to die, the Children of the Forest found him and saved him from dying and turning into a wight with the same process that creates White Walkers (dragonglass inserted into his heart).
In preparation for the coming war against the White Walkers, Jon Snow, the newly-acclaimed King in the North, give orders for every maester in the North to search for dragonglass, so that it could be mined and made into weapons. He pressed upon his lords that dragonglass was now far more precious a resource to the people of the North than gold.
During his research on the White Walkers at the Citadel in Oldtown, Samwell Tarly discovers that a massive mountain of dragonglass could be found on Dragonstone, an island located near Blackwater Bay which had been the ancestral home of House Targaryen since before the Conquest. He immeditaly sent a message to the North, informing Jon of his find.
On Dragonstone, Jon tells Tyrion Lannister of the dragonglass' ability against the army of the dead, who later tells Daenerys Targaryen. Not wanting to waste time on a feud over the glass, she allows Jon to mine for it, whilst she concentrates on defeating Cersei Lannister.
In the books
In the A Song of Ice and Fire novels, dragonglass is found in quantity on Dragonstone and in the ruins of Valyria, where it was used to make different kinds of ornaments, including candles. It is also an export from Asshai. According to legend, the Children of the Forest also made use of the substance. Samwell Tarly discovered, by chance, that dragonglass is one of the few materials that can harm or kill Others. According to legend, every year the Children of the Forest would provide the Night's Watch with one hundred daggers made of dragonglass specifically for that purpose.
Stabbing an Other with dragonglass will cause it to melt into a puddle of very cold liquid, not shatter to pieces.
Dragonglass is useless against wights: Sam discovers that by stabbing a wight with a dragonsglass dagger, and the dagger shatters to pieces. He later tells Melisandre about the anomaly, that what kills Others is ineffective against wights. She explained "Necromancy animates these wights, yet they are still only dead flesh. Steel and fire will serve for them. The ones you call the Others are something more". Dragonglass apparently has no special effect on them, given that the TV series has confirmed that Valyrian steel can also kill White Walkers but to wights it is only a particularly sharp sword that can carve through them better than regular steel.
After hearing Sam's story about killing the Other, Stannis says that on Dragonstone there is much of that obsidian in the old tunnels beneath the mountain, in many colors: mostly black, some green, red and purple. Unlike in the show, Stannis does not just mention that; recognizing the importance of the material, he sends a word to Ser Rolland, the castellan of Dragonstone, to begin mining it. It is unknown whether his command has been fulfilled.
There are old notes claiming that something called "dragon steel" is also lethal to the Others. Jon and Sam suspect this refers to Valyrian steel, but in the novels, the theory has not been put to test yet.
Dragonglass is sharper than steel, but also more brittle. For this reason it does not make good swords because they might shatter, but smaller daggers are more sturdy and therefore more common. They are also very effective as arrowheads.
When the wildlings come to Castle Black, Jon examines their weapons and notices some of them are made of dragonglass. It is unclear whether the wildlings are aware that dragonglass is lethal to the Others, and have made those weapons for that purpose. It is possible, given their technological level, that dragonglass was simply the sharpest material those particular wildlings had available.
Apart from its effectiveness against White Walkers and its use in magic, dragonglass is identical to real-world obsidian, down to its volcanic origins, its overall functional limitations, and its use as a reliable cutting tool by peoples who had yet to develop metallurgy. The World of Ice and Fire directly states that "obsidian" is what maesters officially call this type of volcanic rock, while "dragonglass" is a popular name for it used by the common people. That being said, it is often referred to as "dragonglass" in the novels, except for one or two points when a maester calls it "obsidian" (to point out to readers that "dragonglass" actually is "obsidian") and in A Storm of Swords, Samwell Tarly refers to it as "obsidian" a number of times. The Valyrian word for dragonglass translates as "frozen fire".