If you remember back a few years ago, I mentioned that my officemate, Dr. Naomi Marks, and her graduate advisors at UC Davis at the time, Dr. Peter Schiffman and Robert Zierenberg, along with other colleagues, drilled into an active magma chamber in Iceland. Now, rather than hitting basaltic lava like you might expect in Iceland, they hit a small pocket of rhyolite that was still molten (and wreaked havoc on their drill rig). The results of that serendipitous event were published in Geology showing that this rhyolite might be the product of melting of hydrothermally-altered basalts under Iceland (rather than being directly from a mantle source). Why would the basalts need to be hydrothermally altered? That comes down to needing to lower the melting point of basalt, so that new, mantle-derived basalts can impart their thermal energy of the old basalts and melt them - and hydrothermally altered the basalts into water-rich minerals can do just that. The abundant hydrothermal circulation of fluids in the Icelandic crust - as seen in hot springs and fumaroles - would be sufficient to convert basaltic minerals like pyroxene, plagioclase and olivine into clays and micas, all of which are water-rich in their mineral structure. This means that the altered rock will melt at a lower temperature than the original basalt, so when a new basaltic intrudes this altered rock, the altered rock will begin to melt. Now, unlike ice where if you melt it, you get water that has the exact composition of the ice (H2O), if you start to melt a complex solid like rock, you get a "partial melt", where only some components of the rock will melt, thus producing a liquid (i.e., magma) that has a different composition than the rock that started to melt. In the case of a hydrothermally-altered basalt, you might expect that the first minerals to melt (ones with the lowest melting point) would produce a bulk melt (magma) that was rhyolite in composition and you don't even need that much of the rock to melt, likely <5% melting - so you can produce a rhyolite magma from melting an ostensibly basaltic rock.
As interesting as that might be, one more practical aspect that comes from drilling into the magma pocket is that it suggests a potential new source of geothermal energy. Most geothermal energy is produced by merely drilling into warm rock and circulating water into this rock to produce steam that then drives turbines (see below). However, the team working on the "magma well" (as it is called) would be very productive geothermally, producing dry steam at 400 C / 750 F, which equals ~25 MW of electricity, enough for 25,000-30,000 homes. For comparison, a standard geothermal well produces ~5-8 MW of electricity. Now, drilling into magma is tricky - first you have to find it by drilling, and for the Iceland project, the drill hole was over 2.1 km / 6,900 feet deep (initially on its way to 4.5 km / 15,000 feet). So, intensionally trying to drill into a magma chamber might be like finding a needle in a haystack (if that haystack was made of solid rock). Of course, there is the concern of what exactly might be the ramification of drilling into an active magma chamber as similar projects in Italy to look at the inner workings of the Campei Flegrei have been met with (unfounded) fears that it would trigger an eruption. However, with the evidence that geothermal and other drilling in Switzerland, California and potentially other places might have caused seismic activity to increase or the infamous Lusi mud volcano in Indonesia caused by exploratory drilling, it seems prudent to take the cautious road when it comes to drilling into geologically active crust (and then pumping liquids into said crust). This discussion also shows that balance in Iceland between what people fear from their volcanically active island and what the benefits of such a location entail.
Illustration showing the normal depth of Icelandic geothermal drilling and the Iceland Deep Drilling Program (IDDP) drillhole that was in search of supercritical fluids. The drilling expedition halted before reaching the intended depths after hitting active rhyolite magma.