Modularity, understanding systems as the combination of separated components, is a prevalent concept in biology, social science and engineering design. This book offers a general theoretical model of emergence of modularity during evolution in changing environments. Evidences from protein interaction network and protein domain network support this theory as a general law of evolution in complex systems. Applying it to animal development, this theory appears to provide an explanation for the occurrence and timing of the Cambrian explosion. Applying it to trade networks, this theory predicts that globalized economy is more sensitive to recessions. This book also introduces a quantitative measure of hierarchy, a statistical method to predict the dominant flu strain and the first theoretical model to explain the bacterial acquired immunity (CRISPR). The information in the book should help shed some light in the study of complex systems, flu vaccine, and bacterial antibiotic resistance.