In short, It was a mix of make-up and CGI.
For Two-Face, Nolan decided to break new ground. "This character was
one of our major vfx challenges," recalls overall Visual Effects
Supervisor Nick Davis. "Chris was not interested in going the
traditional make-up route. He felt that it would be an additive
effect, rather than the subtractive effect that he felt the character
required. So, instead of adding a layer of material to the actor's
skin, we actually removed the skin digitally. It allowed us to reveal
the tendons, the cheeks, the eyeballs and to create unique textures.
The challenge here was that we were dealing with one of the main
characters, and that the digital make-up would be seen in full
close-up, including in dialogue scenes…
Framestore's White notes that the key to the Two-Face project was to
get enough detail into the CGI to give it realism. "In doing so, we
worked at much higher texture resolution than we normally use. We also
rendered our CG work at 4K, even for the regular 2K anamorphic shots.
A very large number of texture layers were needed, and displacement
maps from Mudbox were combined with bump maps and displacement maps
painted in Photoshop. It really took a significant amount of work to
get it right."
The full details are explained here.