In the segment, his apprentice, Mickey Mouse, watches him cast spells before he decides to take a break, leaving his hat behind.
Mickey takes the hat and uses its magic to bring a broom to life to help him retrieve water from the well.
Chernabog is a devil who appears in Night on Bald Mountain, who can take people's hearts and holds power over various restless souls.
While officially a pagan god, Chernabog may have been intended as a representation of Satan, with Walt Disney and Deems Taylor referring to him as such.
[1] In the segment, on Walpurgis Night, Chernabog is disguised as the spire atop Bald Mountain until he reveals himself and uses his powers to raise various evil spirits and restless souls.