The Eastern Bloc (or Soviet Bloc) was a term used in the Cold War to describe the following countries: Bulgaria, Romania, Hungary, East Germany, Poland, the former USSR, and the former Czechoslovakia. The Eastern Bloc is also often equated with the Warsaw pact.
Former Yugoslavia (and its six former republics Serbia, Montenegro, Croatia, Slovenia, the Republic of Macedonia, Bosnia and Herzegovina) was never part of the Eastern Bloc or Warsaw pact. Although it was a Marxist state, its leader, Marshall Tito, came to power through his efforts as a partisan resistance leader during World War II, and thus he was not installed by the Soviet Red Army, and he owed the USSR no allegiance. The Yugoslavian government established itself as a neutral state during the Cold War, and the country was one of the founders of the Non-Aligned Movement.
Similarly, the Marxist Albanian government also came to power independently of the Red Army as a consequence of World War II. Albania broke with the Soviet Union in the early 1960s and aligned itself instead with the People's Republic of China.
Nations within the Eastern Bloc were held in the Soviet orbit through military force. Hungary was invaded by the USSR in 1954 after it had thrown off its pro-Soviet government; Czechoslovakia was similarly invaded in 1968 after a period of liberalization known as the Prague Spring. The latter invasion was codified in formal Soviet policy as the Brezhnev Doctrine.
The Eastern bloc came to an end with the collapse of the pro-Soviet regimes in Eastern Europe in 1989.