The United States did not prevent communism after World War II, but it did attempt to slow its spread. Two of the best examples of this are the Korean War and the Berlin Airlift.
In the Korean War, the United States assisted the fledgling South Korean government when the communist North Koreans invaded.
When the Soviet Union attempted to strangle Berlin, the United States flew nonstop missions to deliver much needed food, supplies and medicine (the Berlin Airlift).
Small proxy wars were fought all over the globe, most of which never directly involved the two 'superpowers.' This worldwide game of chess was repeated throughout the Cold War.