Principles of nuclear magnetic ordering