"Dr XXX", better known as the Mad Doctor, is a human man (who was briefly transformed into an animatronic).
The Mad Doctor is an insane scientist with a Russian accent and a habit to sing rather than talk. The Doctor used to live in a large haunted castle, in which he had installed a laboratory. The Doctor first crossed paths with Mickey Mouse when he kidnapped his dog Pluto, intending to use him as a guinea pig for an insane experiment. However, Mickey and Pluto both escaped unscathed back to their house and brushed the whole adventure off as a dream.
Later, forgotten by all, the Mad Doctor found himself in Wasteland, a magical world Yen Sid had created as a home for forgotten things and people. There, the Doctor befriended Oswald Rabbit and created robotic servants, the Beetleworx, to help run the realm. When the Blot arrived, however, the Doctor turned on Oswald, turning himself into a cyborg (so as to be more resistant to the Blot's attacks, which drained lifeforce from organic beings) and trying to take over Wasteland in the chaos. After the Blot was vanquished, the Doctor formed an alliance with the Blot's Shadow, terrorizing the land for years.
However, in 2010, Mickey Mouse returned to Wasteland himself after a series of odd adventures and defeated the Doctor, also revealing his true nature as a robot. The Doctor's lab in Lonesome Manor was destroyed and he was blown away in an explosion. He was believed dead for a few months, missing out on the destruction of the Blot by Mickey. When he returned, he claimed to have reformed and won back Oswald's favor, once again using his Beetleworx to help Wastelanders.
This was, however, only a ruse. In truth, the Mad Doctor was planning to suck out the magic of Wasteland to reverse the damage he'd done to himself in making himself robotic. (This was coupled with a rather extraordinarily complicated plan to kill Mickey Mouse, escape from Wasteland and back into the real world, and more.) After Mickey and Oswald saved the Doctor from certain death at the hand of one of his own malfunctioning machines, however, the Doctor truly reformed, abandoning his mad dreams.
Behind the scenes
The Mad Doctor was first seen in 1933 in The Mad Doctor, the short for which he was created. According to a 1932 story outline for The Mad Doctor by Walt Disney, one concept for "the Big Bearded Mysterious Doctor", as the outline referred to him, would have had him as living skeleton. This idea was dropped, and Dr. XXX would be portrayed as a normal human.