In the Middle Ages, nobles and people of the ruling class who were convicted of heresy, treason or other capital offenses were executed quickly. The object was a painless death.
That was not true for the common people, however. For them, the longer the death process, the better the entertainment value for those inflicting punishment (and those watching it occur).
Hanging was common - even for stealing. But medieval hanging was not the type of execution which occurred in the 19th century, for example, where the neck and spinal chord are quickly severed (in "the English drop").
In the Middle Ages, a hanging could last several hours - or more - before death occurred. It was the type of hanging where a body was left to slowly strangle. It was hanging where the victim was sometimes positioned upside down, with a stone around his neck.
To inflict even greater punishment on the "convicted" heretic or criminal, authorities used "cat paws" to rip the victim's flesh to shreds. With hands unavailable to ward off flies and other insects, the accused would suffer even more as blood flowed from a shredded body.
In really heinous cases (like the story of William Wallace), the conscious victim would be taken down before death and disemboweled. In other cases, the victim's body would be racked with pain - before the hanging - by instruments of torture like the head crusher.