The Cold War developed out of post World War II rivalries between the United States and the Soviet Union. With the destruction of Germany and the weakening of Britain and France, the USA and USSR were the only two powers remaining. The conflict that would become the Cold War emerged from a dispute over what would become of Eastern Europe after the war. Franklin Roosevelt and Stalin had vaguely agreed at the wartime conference at Yalta that Poland would have free elections and a democratic government. Eventually, though, it became clear that Stalin would establish a puppet communist regime there. By the time Truman and Stalin met at Potsdam, the United States was convinced that the Soviets were attempting to conquer all of Eastern Europe. Stalin, for his part, was concerned with ensuring that the Soviet Western border was secure, and saw American plans for the reconstruction of Western Europe as equally imperialist in nature.
This belief was intensified with American support for anti-communist fighters in Greece and Turkey and eventually the massive aid package for western Europe known as the Marshall Plan. By 1948, the two allies found themselves facing off across a divided Germany and elsewhere along what Winston Churchill called an "iron curtain" that stretched across eastern Europe. In the meantime, China had become a communist nation under Mao, and North Korea would soon, with Soviet support, invade the south. Both sides came to see all of geopolitics in terms of a struggle between communism and western democratic capitalism.
The conditions that fuelled the cold war were also present before WWI this included nationalism, imperialism, entangling alliances, an arms race, but not complacency, since everyone was on edge.