NATO was formed in 1949 as a collective defense alliance by the United States, Canada, and several Western European countries. Its purpose was to provide mutual security against the Soviet Union and its satellite states in Eastern Europe.
The Warsaw Pact was formed in 1955 in response to NATO. It was a military alliance between the Soviet Union and seven of its satellite states in Eastern Europe. The Warsaw Pact was dissolved in 1991 following the collapse of the Soviet Union.