Five years ago IDDP engineers tried this for the first time in hopes of cultivating an exportable energy technology to help stoke Iceland's flagging economy. An accident triggered a discovery they have been pursuing ever since. While drilling at IDDP-1 deep inside a volcano called Krafla in northeast Iceland, they reached about 2 km (6,500 ft) before they unexpectedly struck magma intruding into the Earth's upper crust from below, at searing temperatures over 1,600 Fahrenheit. The superheated steam set a world record. The IDDP had punched straight through into the bowels of a volcano.

"We discovered that we had developed the hottest wellhead in the world," said Dr. Wilfred Elders, an emeritus professor of geology at the University of California, Riverside, and co-chief scientist for the IDDP. Landsvirkjun, Iceland's national power company and the owner of the well, had no idea what to do with superheated magma bubbling up the well pipe at temperatures upward of 1,600 degrees Fahrenheit. "At that point, we could have abandoned the well," Elders said. "We knew we had this very high energy heat source, but we didn't know how to deal with the temperatures and pressures."

Read MoreThe future of energy: You may be walking on it

Instead, Landsvirkjun pushed ahead with well construction, inserting a special steel casing into the well and leaving a perforated section at the bottom closest to the magma. Heat was allowed to slowly build in the borehole, and eventually superheated steam flowed up through the well for the next two years. During that time, it provided more than half of the Krafla plant's 60-megawatt output. It wasn't until a valve failed that Landsvirkjun was finally forced to seal the well by pumping in cold water.