Can someone explain why Josip Broz Tito didn't ally himself with Stalin, and controlled Yugoslavia without it being under the influence of the USSR?
not_wally's response is a bit partial so i will try to give some insight (i'm from Serbia which was part of Yugoslavia)
Yugoslavia and USSR started really well, for the first 3 years. They were natural allies and Tito fully had a goal to remain an ally with Stalin. But around 1947-48, few problems started to arise between YU and USSR:
1.) Yugoslavia started developing a distinct type of communism, a bit more free from a centralized Stalinist control and a planned economy, which was later in the 50's more defined and called ''Self-managing socialism'' (Самоуправни социјализам/Samoupravni socijalizam).
2.) Yugoslavia started up an idea of a Balkan communist federation or confederacy, which would involve Bulgaria among other countries. Soviets were very aggressively against this idea (that would practically mean the whole Balkans would be out of the reach of their influence, developing under influence of Yugoslavian communist ideals).
Feeling their influence being dangerously threatened, on a Cominform meeting in Bucharest in June 1948, USSR started a smear campaign against Yugoslavia, Tito and Yugoslavian Communist Party. They called Tito ''the agent of western imperialists'', and called out YCP for straying off the way of Marxism. This essentially started a chain of events:
Tito's pictures started being removed from USSR buildings as well as many other communist countries. As a response, Stalin's pictures started being removed from throughout Yugoslavia. At this point, being fully aware of a possible invasion from USSR and it's allies (who at the end, did side with Stalin), Tito had no choice but to turn to the west.
Accompanied by this opening up, was a very cruel internal cleansing campaign, here in ex-Yu well known as ''period of Informbiro'' (informbiro being our name for Cominform). Tens of thousands of people were arrested, many executed. Anyone not ready to renounce Stalinism was a target. Around this time, famous ''Goli Otok'' gulag-style prison on a Adriatic island of the same name was created. Within a year, Yugoslavia was cleansed of pro-Stalinist elements, and strong ties to the west were established. Also, around 200 thousand pro-Stalinist people left Yugoslavia.
Yugoslavia and USSR would thaw their relationships only 10 years later, when Hrushchev and Tito reconciled the two nations and actually became very close.
P.S. Cominform was a ''Communist Information Bureau'', forum of international communist movement which was born from previous Comintern.
Source: ''Informbiro i JNA'' by Dmitar Tasic, Mihajlo Basara and Milan Terzic. As well as my old history school book.