it depends on the transcription regulators. Each gene has a promoter region and binding of specific transcription factors initiates its expression. In easy language u can think like the DNA rope has a handle with key and keys are tissue/cell type specific and that drives the rope.