Was the Lonely Mountain in The Hobbit a volcano?
If not, how did the dwarves get enough heat to run the huge forges?
I am asking about the books, not the movies.
Speaking as a geologist: The Lonely Mountain is probably an extinct volcano. J. R. R. Tolkien depicted the mountain several times in sketches and watercolors, and in most of them the volcano is steep-sided and conical with a flattish peak. One of them clearly shows a crater at the top (http://tolkiengateway.net/wiki/Back_Door). None of the depictions show any kind of stratigraphic bedding, though it might be hard to see at this scale.
This form is consistent with a stratovolcano having somewhat eroded sides and a crater. Compare Fuji, Vesuvius, Etna, Mt St Helens, and so on. Tolkien would certainly have been familiar with some of these volcanoes in illustrations. However, in Thorin's map, the Lonely Mountain has a sharp peak with no crater, so the evidence is inconsistent. It may be that Tolkien's ideas shifted over time.
Tolkien was unaware of plate tectonic theory when he wrote The Lord of the Rings, for the excellent reason that it did not exist yet, but he evidently made good use of his knowledge of European geography. The tall mountain chains within Middle-earth (Misty Mountains, White Mountains, etc.) are similar to the Alps and Pyrenees that he knew. The mountains that wrap around Mordor are more unusual, but a parallel exists in the Carpathians. A stratovolcano in the middle of a continent is an anomaly, and he probably was aware of that. Usually they occur on the margins of continents, but there are a few exceptional cases such as Kilimanjaro where they occur far inland.
As to the Lonely Mountain's composition, Tolkien mentions that it was rich in ores and gemstones. Fresh volcanic rock itself usually yields neither, but hydrothermal (hot groundwater) circulation in fractures or porous rock (e.g., tuff resulting from ash) can result in deposition of gold, silver, and copper as well as lead and sometimes nickel (http://volcano.oregonstate.edu/book/export/html/170). Diamonds are a possibility in one kind of volcanic rock, but not in stratovolcanoes, so diamonds would not be expected.
If the Lonely Mountain is not a volcano, then the question of how it obtained its nearly symmetrical form, with a flattish or cratered peak, becomes a problem.
There is no evidence that the Lonely Mountain is a volcano. The Hobbit repeatedly identifies Smaug as the mountain's sole source of heat and smoke. For instance, there is this conversation between Bilbo and Balin, near the beginning of chapter 11:
“The dragon is still alive and in the halls under the Mountain then — or I imagine so from the smoke," said the hobbit.
“That does not prove it,” said Balin, “though I don’t doubt you are right. But he might be gone away some time, or he might be lying out on the mountain-side keeping watch, and still I expect smokes and steams would come out of the gates...."
As to how the dwarves of Erebor operated their forges, the answer is presumably the same as in real life. When they needed high heat for their smithing work, they used coal. We known that coal-burning forges are used in Middle Earth, from Gandalf's sarcastic comment to Thorin in chapter 1:
"... Just let any one say I chose the wrong man or the wrong house, and you can stop at thirteen and have all the bad luck you like, or go back to digging coal.
As a matter of myth-construction, a mountain that periodically issues smoke and steam (i.e. a volcano) would probably give rise to local legends of occupation of that mountain by an iron-working race and/or some kind of monster that produces smoke. So as a literary or mythopoeiac matter, the Lonely Mountain is probably a volcano.
The other isolated mountain in Tolkien's geography, Mt. Doom, is explicitly a volcano. The difference in their treatment may be a result of the fact that Mt. Doom is much more violently active.