The different punishments inflicted to the sinners in Dante's Inferno always fit their crimes. The structure of hell follows the "law of symbolic retribution" as the sinners are piunished in the same way they have sinned.
Farinata Degli Uberti is put in Circle Six among the Heretics and Epicureans. Farinata was the leader of the Ghibellines, a political faction that favored the authority of the empire against that of the Pope and the Church. Because the sin of the heretics was to consider their knowledge superior to that of religion and the Church, their souls cannot rest in peace: their open graves are constantly burning.
Tiresias is in the Fourth Bowge of Malebolge (the Eighth Circle) among the sorcerers. As they tried to predict the future, they are forced to walk with their heads turned backwards.
Ulysses is in the Eighth Bowge of Malebolge among the counselors of fraud. These people persuaded others to act fraudulently. Ulysses first persuaded the Greeks to build the Trojan Horse with which they entered Troy and then convinced his sailors to go beyond the Pillars of Hercules. He is condemned to burn in a dual flame with Diomede. As Ulysses constantly hid his true intentions in life, now he is condemned to be hidden by a flame. The fire is as consuming and devastating as Ulysses's speeches were for others.
Ugolino della Gherardesca, an aristocrat from Pisa, is in the second region of Cirlce Nine which includes traitors against their own country. The sinners in this region are immersed in the frozen Cocytus River up to their heads. Ugolino had conspired against the government of his own city by helping to establish a Guelph regime. He was imprisoned and put in the Tower of Famine where he was left to die of starvation together with his sons and grandsons. According to several critics, Ugolino also ate the flesh of his own relatives and that's why his punishment is the condemnation to perpetual hunger. He tries to quell this hunger by eating the head of his political enemy, Archibishop Ruggeri.