I have this idea of a character capable of manipulating heat (more than just controlling fire, really controlling the heat of stuff around him). Let's now say that this character digs a tunnel. Would it be possible to harden the sides of the tunnel (and even create kind of pillars) simply by heating the dirt around ? Like turning it into a kind of magma and then cooling it down into something solid ?
Depends on the dirt.
The best farming soil wouldn't work for this, as it's mostly organic substances, with mineral material as a substrate. Clays wouldn't work well, either, because by the time rock has weathered into clay, most of what might be seen as "rock" material has been converted to something that forms microscopic flakes that make up the clay -- they won't actually melt in a fire, they just sinter even at kiln temperatures, so you get something more like fired ceramic.
What would work, at least to some extent, is sandy soil. The sand is largely quartz (which melts at similar temperature to glass), feldspars (which melt at similar temperatures) and micas (which don't really melt, but will dissolve in the melt). The end result will likely resemble obsidian more than, say, granite -- but it'll pretty clearly be a rock of some kind.
This does require a fire much hotter than a campfire -- an air-blast coal fire could get hot enough, and surely a gas-oxygen torch flame could.
It depends on where he is digging.
Some grounds can be "easily" turned by heat into a glassy material, some require more attention.
The higher the organic fraction, the more difficult it is.
The higher the clay content, the more difficult it is. (as a kid I tried to bake some clay which I dug from the ground. It became hard, but crumbled directly in the oven)
Dirt contains a lot of organic compounds that would simply burn if you tried to melt it (at least if the environment contains any kind of oxidizer). You could however try to harden the dirt akin to clay by removing the water with heat, but then again, it would most likely become brittle.