It was based on a system of collective defence whereby the member states agreed to mutual defence in response to an attack by an external party.
Funny that people from western Europe and the USA were indeed expecting an eventual attack from the Eastern-Block, USSR, while the people in the USSR were not much scared of a military confrontation between the two superpowers. Western people were more affright of the cold war than the Russians.
I think that the cold war was an exaggeration which was needed to give legitimacy to the existence of the NATO-pact.
The Soviet Union collapsed in 1991. So why does NATO still exist?
That's true when the USSR collapsed in 1989, the existence of the NATO-pact lost it's major purpose to exist. If the NATO-pact would also disintegrate, Europe would become much more independent from the US and the American influence in Europe would decrease. This did not benefit the American interests on geo-political level. When the USSR collapsed the West needed new arguments to guarantee the legitimacy of the further existing of the NATO.
As soon as the German lands reunified, the European Community started to advocate for the disintegration of Yugoslavia. Everybody knew that civil wars would occur during the disintegration of Yugoslavia, if Yugoslavia would be forced to split apart into the administrative borders. The civil wars within Yugoslavia gave legitimacy to the existence of the NATO. The NATO was engaged in the separatist wars within Yugoslavia and this was a good opportunity convince Europe that NATO needed to exist.
Currently we have a so called war on terror and that explains also why NATO stil exists.