Collective security is a mechanism whereby a group of countries come together and agree that they will consider an attack on one of them as an attack on all of them which warrants a response from all of them. It tends to be more ambitious in scope than a standard alliance in that it aims to incorporate all the countries in a region or even on the globe.
Collective security has a long history but was most recently influential in the Cold War, where NATO and the Warsaw Pact eyed each other through the Fulda Gap. This sort of regional arrangement was necessary after it became obvious that the two superpowers could stymie attempts at global collective security by exercising their vote at the United Nations Security Council. It was initially the ambition of the United States to create other organizations similar to NATO around the borders of the Soviet Union to create "positions of strength" to contain what was taken to be inevitable Soviet aggression.
This plan quickly ran aground, as with so much else in post-war American foreign policy, in the jungles of South East Asia. Here, the U.S. created SEATO, whose similarity in name to NATO was supposed to indicate an approximate similarity of function - and was likewise aimed at Communists - but which was stymied by a lack of political and cultural affinity among the countries in the area. It quickly became apparent that collective security had limits and had to be based on a shared sense of collective insecurity if it was ever going to amount to anything.
NATO now faces the same problem: no-one can decide what it is there to provide security against. Squabbling is hence the norm, further undermining the trust necessary to be effective if a threat re-emerges.