NAM was a organization founded mainly by Nehru, Tito and Marshall. Its main aim was to safeguard the needs of developing countries from already developed countries. The nations which became part of NAM, didn't go in USSR or USA side as they were two superpowers in the world. NAM's aim was to get help from both USSR and USA by maintaining friendly relations with them and hence developing the countries that were part of NAM.
The seed for NAM was BANDUNG Conference,1955/56 headed by sukarno,who is one of the founding fathers of NAM,in 1961 it took the organisational structure..our honourable then p.m nehru gave it a good structure and  respected principles,which were written in panchsheel and not to go hand in hand with communist and capitalist blocs...non alignement means  not to cooperate war blocs in fighting with each other....and its main is protect newly born blocs from already grown capitalist and communist blocs,,don't let developing countries  entering into  hands of developed countries and help them in developing is called 3rd bloc at that has its significance during cold war,,bcoz peaceful nations and 3rd world nations try to join here,,it swelled with these countries,,but after ussr occupied afghanisthan and after disintegration of ussr it lost its signifance...