The expression of protein coding genes happens by the process of transcription. So promoters facilitate access of the RNA polymerase complex to DNA to begin transcribing a locus on the genome. The promoter of a gene often contains sequences that bind proteins called transcription factors, which play a role in various parts of the transcriptional process as well as components of RNA polymerase themselves (Such as a Pribnow box in prokaryotes, or a TATA box or an initiator element in animals).
So whether a gene is turned on and if so, how much it is turned on, is a property of how many transcription factor binding sites exist in the promoter, the nature of the transcription factors themselves in terms of their influence on transcription, and in eukaryotes and some archaea, epigenetic processes that control the access of transcriptional machinery to the locus being transcribed.
So when you think about the two elements in a gene, think of a light (the bit of a gene that codes for proteins) and a dimmer (which controls how much RNA is made by the protein-coding bit)