NATO was created in Washington on 4 April, 1949. It was a military alliance of Western capitalist countries. If one NATO member-state was attacked, the other member-states would help defend it.
By 1949, Eastern European countries were communist. There was a fear that the USSR would attack a Western European country to spread communism.
Communist countries were established in China and North Korea.
The formation of NATO meant that the USA could place weapons in member states to stop the communists from attacking.