Situation in Hungary before 1956 was bad with runaway hyperinflation, total collapse of the economy, and low living standard while at the same time treated by USSR as a defeated enemy. Hungarian political situation was unstable, because Hungary was an enemy of USSR during WWII, and communist regime had difficult time establishing a collaborative regime was was the case of Czechoslovakia, Romania, or Bulgaria. The political establishment in Hungary was run by people who did lived there for decades (some of them were exile of failed communist revolution of 1919 and spent time in USSR until 1946 like Rakosi), and Hungarian population did not accepted them. Therefore, the leadership was depended on Soviet support and was cohered to fulfill any Soviet demands. And Soviets did demanded a lot. Hungary was thoroughly looted and required to pay high reparation to USSR that was estimated to be us much as 30% of GDP before 1956.
In 1956 came a weakening of Stalinist rule throughout the Eastern Block which undermined the dictators across the region. In Hungary the situation was ripe for revolution by combination of oppressive political system, bad economy, and feeling to be occupied by foreigner, hostile power. The situation in Hungary exploded under influence of Polish worker's uprising in Poznan. The population in Budapest staged demonstration for support of Poland, and was brutally attacked by communist secret service. The news of bloodbath spread out through the country and people attacked symbols of the communist party. Revolution was born. Since Hungary was in difficult political position, it also experienced a brief civil war among various parties attempting to wrestle a control of the country. Nagy was a leader of Hungary that desired a national independence from USSR and ending Soviet control of the country. He paid with his stance at gallows. Hungary managed to wrestle out significant independence from USSR and it had one the most benevolent form of communism in the Warsaw Pact.