DNA and gene activation
Your question refers to differential gene expression and methods of Eukaryotic gene regulation. This is a very broad question for there are a lot of methods to control gene expression. They can function as transcription control, mRNA processing control, translational control, post-translational control and so on in eukaryotes. In prokaryotes, the methods include the operon model etc, which is much simpler than eukaryotes and multicellualr organisms but still quite complicated when studied in its entirety. Here and Here are few places where you can study differential gene expression. As an introductory text,  chapter 19 of Life:The science of Biology by Purves, Sadava, Orions and Heller(the link is to a supplementary-material site and not to the book itself), Otherwise, to elucidate all mechanisms here would become too long and in any case uncomprehensive.