Just a small percentage of genes in a cell are expressed at any given time. The wide variety of gene expression occurs because of transcription regulators. Some transcription regulators increase transcription, while some decrease or even prevent transcription.
Transcription starts when RNA polymerase binds to a promoter sequence on the DNA molecule. This promoter sequence is usually forward of the transcription starting point. Enhancer sequences provide binding sites for proteins that influence RNA polymerase activity by causing a shift in chromatin structure that either inhibits or promotes RNA polymerase and transcription factor binding.
Now, imagine a bacterium with extra amino acids that cause some genes to turn on and off. The cells may want to turn "on" genes for proteins that metabolize amino acids and turn "off" the genes that synthesize amino acids. Some amino acids would bind to activator proteins. This binding enhances RNA polymerase activity and transcription of nearby genes. Other amino acids would bind to repressors or negative regulatory proteins which bind to regulatory DNA areas thereby blocking or causing interference with RNA polymerase binding. Gene expression is quite a complex but elegant process.
What is being asked about here is the workings of an operon. An operon is the whole set of operations that occur during the regulation of gene transcription. RNA polymerases ability to bind to a promoter is regulated by a repressor. Repressors work with other proteins called inducers and corepressors. An inducer will always inactivate the repressor and a corepressor will always activate the repressor. However, a repressor can not be affected by both (a repressor can not be affected by both). If a repressor is activated by a corepressor, it is only inactive if it is not bound to a corepressor. If a repressor is inactivated by an inducer, it is only active when it is not bound to an inducer.
Source: Campbell Biology Seventh Edition AP Edition