We already know how to drill them. It's how to keep producing heat out of them that's the problem. You need to circulate fluid _through_ a large volume of the rock, not just down the borehole. That means you need to create permeability (i.e. fracking. See "enhanced geothermal".) or find permeability at the depths required (i.e. find a reservoir). There are other problems, but the oil industry already developed most of the technology for other things. They've just decided that geothermal is a poor return on investment (in most cases) compared with producing and selling hydrocarbons. On the other hand, the world's largest geothermal energy producer is an oil company.